Hello,
i create a universal display file to do a web service in JSON and use the autocomplete choice URL
so i follow this example http://www.profoundlogic.com/docs/display/PUI/Textbox
but i use RPGLE progamme to valuate PNAME and PRID
i also valuate the query parameter for create JSON with the paramete enter in textbox
and i map the URL /TST_JSON to my programe in PUIMAPP
so in my screen on the textbox i add in choice url my link
Auto complete with json display bug
-
- New User
- Posts: 16
- Joined: Mon Jan 18, 2016 5:50 am
- First Name: alexis
- Last Name: boisson
- Company Name: tereva
- Contact:
-
- New User
- Posts: 16
- Joined: Mon Jan 18, 2016 5:50 am
- First Name: alexis
- Last Name: boisson
- Company Name: tereva
- Contact:
Re: Auto complete with json display bug
so i make some test and its seems to work well
it dosent display the good result it show me the last result so the JSON is good just the data in div is not good and its make it for some word but not all just a few.
but when i write "vasque double" the programe send me the good json but the auto complete div is not open and when i foce the div with display: block it dosent display the good result it show me the last result so the JSON is good just the data in div is not good and its make it for some word but not all just a few.
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Auto complete with json display bug
Your Universal record for "content" looks wrong to me.
The problem that I see is that there is a comma at the end of your data. This is a problem because it is not legal in JSON to have a comma at the end of the data unless there is another element that follows it. So the following would be valid:
But the following would not be valid (and this is what yours would look like)
The Universal display file has a feature to solve this problem automatically. Please remove the trailing comma from your "content" record. Without the comma it should look like this:
then change the "separator" property for the record format to contain a comma. the Universal display handler will automatically put a seperator between elements (but not after the last one).
Let me know if that helps
The problem that I see is that there is a comma at the end of your data. This is a problem because it is not legal in JSON to have a comma at the end of the data unless there is another element that follows it. So the following would be valid:
Code: Select all
[
{ data },
{ data },
{ data }
]
Code: Select all
[
{ data },
{ data },
{ data }, <-- extra comma at the end makes it NOT valid
]
Code: Select all
{
"PNAME": "[nom]",
"PRID": "[num]"
} < -- NO COMMA HERE
Let me know if that helps
-
- New User
- Posts: 16
- Joined: Mon Jan 18, 2016 5:50 am
- First Name: alexis
- Last Name: boisson
- Company Name: tereva
- Contact:
Re: Auto complete with json display bug
I can't test it this week , but I will keep you informed
-
- New User
- Posts: 16
- Joined: Mon Jan 18, 2016 5:50 am
- First Name: alexis
- Last Name: boisson
- Company Name: tereva
- Contact:
Re: Auto complete with json display bug
Hello,
I tried your solution and it still not work but i see a little difference, when JSON work he appear like that
and when the he dont, like that Any idea?
I tried your solution and it still not work but i see a little difference, when JSON work he appear like that
and when the he dont, like that Any idea?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Auto complete with json display bug
There is an error in your JSON somewhere. You will need to discover where it is and fix it.
-
- New User
- Posts: 16
- Joined: Mon Jan 18, 2016 5:50 am
- First Name: alexis
- Last Name: boisson
- Company Name: tereva
- Contact:
Re: Auto complete with json display bug
Hello,
Inded i tested my json in validator and i find error with a quote in a label
thank you for your time.
Inded i tested my json in validator and i find error with a quote in a label
thank you for your time.
Who is online
Users browsing this forum: Bing [Bot] and 0 guests