Hi,
I'm setting the "text" and "value" to dropdown(xtype:selection,type:select) widget using optionsProvider dynamically. I'm unable to set the default to this dropdown. Is it possible to set default value dynamically? Please let me know.
Thanks,
AryA.
Solved! Go to Solution.
Views
Replies
Total Likes
We have a community article that talks about dynamically setting custom xtype controls:
http://helpx.adobe.com/experience-manager/using/dynamically-updating-aem-custom-xtype.html
To get language - you will certainly have to use some JS app logic.
Views
Replies
Total Likes
We have a community article that talks about dynamically setting custom xtype controls:
http://helpx.adobe.com/experience-manager/using/dynamically-updating-aem-custom-xtype.html
To get language - you will certainly have to use some JS app logic.
Views
Replies
Total Likes
Hi Scott,
I'm able to get the language using JS API and also I'm able to see the respective values for dropdown in respective language. But I'm unable to set the default value to this dropdown dynamically. If I set "defaultValue" to some "None" for English on the dropdown widget, if we open the dropdown in French language preference, it is showing "None" instead of some French word, "Accun". Any idea?
Thanks,
AryA.
Views
Replies
Total Likes
Once you determine the selected language - call a user-defined method (defined in your custom xtype) that clears the drop down control and re-populate it with a data source that contains string values that are in a specific language.
Views
Replies
Total Likes
Hi Arya,
The way it works is when the default value matches one of the options value. So use the property 'defaultValue' on the node having xtype as 'selection'.
Thanks,
Sham
Views
Replies
Total Likes
Hi Sham,
Actually I've to show the corresponding value in different languages. If I add "defaultValue" to node then in different language also it will show the same English default value. For example, I've to show "None" in English and "Accun" in French. If I set "defaultValue" to "None" then it will show "None" when we author in "French" language. Correct me if I'm wrong. Please let me know the solution. I think we can't achieve this using i18n as well.
Thanks,
AryA.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies