I'm using the nfeed JIRA plugin to get values for a Select List via a simple JSON web service. The data returned from the URL looks like:
[
{"class":"country.list.Country","id":1,"countryCode":"AF","countryName":"AFGHANISTAN"},{"class":"country.list.Country","id":2,"countryCode":"AX","countryName":"ÅLAND"},{"class":"country.list.Country","id":3,"countryCode":"AL","countryName":"ALBANIA"},...
]
I've set the URL to point the JSON service and the Select List gets populated with <options> that all look like the following:
<option value="country.list.Country">country.list.Country</option>
If I change the Key setting in nfeed (to 1 or 2) I can change the value attribute in the <option>, but I can't see how I can change the user visibile label on the <option>.
I've tried setting the "Rendering for * view" fields to {3} or 3, with and without the native filter option enabled but to no avail. Nothing I've tried will change the labels in the Select List.
The "Query for search summary" and other "Query..." options might be relevant but I'm not sure how one would use them to select an entry from a JSON object, and all the examples talk about SQL queries so they're of little help.
Is there something I've missed?
Hi Simon,
For the moment the integration with the webservice is quite simple. The "select list" displays the first information provided in the JSON file, in your case "country.list.Country"
To obtain the list of country in the select list your JSON file has to be like this:
[
{"countryName":"AFGHANISTAN","class":"country.list.Country","id":1,"countryCode":"AF"},{"countryName":"ÅLAND","class":"country.list.Country","id":2,"countryCode":"AX"},{"countryName":"ALBANIA","class":"country.list.Country","id":3,"countryCode":"AL"},...
]
The key will be 2
You should apply the "Native filter"
and in the render HTML you can display {0} ({3})
The capability to display in the select list any properties could be great.
You can create an improvement on our JIRA
Regards
Cyrille
Thanks Cyrille, it would be nice to be able to customise. In this case we can change the output order but we have some other services we'd like to use which we'll need to proxy or similar to achieve this :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.