I have various different dropdown fields in my dialog.xml that i fill by calling a servlet using the options tag and then using the options root to say which JSONArray I want. This works well, however the same servlet calls an outside source and makes all of the JSONArrays so by having the options and options root on all nine of my drop downs it ends up calling the servlet nine times so it takes forever to load. Is there a way to call this servlet once, maybe in the root, and then access it by passing which options root i want in each dropdown?
ex.
<productsValue
jcr:primaryType="cq:Widget"
emptyText="Please Select..."
fieldLabel="Property Value"
name="./productsValue"
options="path/to/servlet.json"
optionsRoot="products"
type="combobox"
xtype="selection">
</productsValue>
Solved! Go to Solution.
Views
Replies
Total Likes
1. You can use this optionsProvider property to return your JSON data
2. Do not make 9 servlet calls, make 1 and store data in browser localstorage.
3. before next request check localstorage, if data is there use optionsProvider
Views
Replies
Total Likes
You should be able to handle it using JS and listeners.
Views
Replies
Total Likes
I am currently using listeners to do other things such as only showing a certain dropdown when the correct value in the top dropdown is selected. How would i go about achieving this functionality using js and listners?
Views
Replies
Total Likes
1. You can use this optionsProvider property to return your JSON data
2. Do not make 9 servlet calls, make 1 and store data in browser localstorage.
3. before next request check localstorage, if data is there use optionsProvider
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies