Hi,
Default Value for Granite Dropdown (Touch Optimized UI ) is not working for me.
I have followed information on how to create a dropdown control here:
https://docs.adobe.com/docs/en/cq/5-6-1/touch-ui/granite-reference.html#Form Inputs - Dropdown
I have created a it in the following way:
<relationID fieldDescription="Relation ID" fieldLabel="Relation ID" jcr:primaryType="nt:unstructured" name="./relationID" sling:resourceType="granite/ui/components/foundation/form/dropdown" value="SELECT_DEVICE"> <items jcr:primaryType="nt:unstructured"> <option_0 jcr:primaryType="nt:unstructured" text="Select Plan" value="SELECT_PLAN"/> <option_1 jcr:primaryType="nt:unstructured" text="Select Device" value="SELECT_DEVICE"/> <option_2 jcr:primaryType="nt:unstructured" text="Empty" value=""/> </items> </relationID>
PS - i am using granite/ui/components/foundation/form/dropdown but i noticed that there is also a granite/ui/components/foundation/form/select type. what is the difference between them?
Note, if i set the type to multiple I have the same problem and can;t set a default value for it.
Solved! Go to Solution.
Views
Replies
Total Likes
A I wrote...
PS - i am using granite/ui/components/foundation/form/dropdown but i noticed that there is also a granite/ui/components/foundation/form/select type. what is the difference between them?
Note, if i set the type to multiple I have the same problem and can;t set a default value for it.
In the page you linked the the location in the repository is specified as "/libs/granite/ui/components/foundation/form/dropdown"
Opening the render.jsp file I see the following comment:
log.warn("@deprecated /libs/granite/ui/components/foundation/form/dropdown; please use /libs/granite/ui/components/foundation/form/select instead.");
Looking at the example here: https://helpx.adobe.com/experience-manager/using/creating-granite-datasource.html they are using "granite/ui/components/foundation/form/select"
Views
Replies
Total Likes
A I wrote...
PS - i am using granite/ui/components/foundation/form/dropdown but i noticed that there is also a granite/ui/components/foundation/form/select type. what is the difference between them?
Note, if i set the type to multiple I have the same problem and can;t set a default value for it.
In the page you linked the the location in the repository is specified as "/libs/granite/ui/components/foundation/form/dropdown"
Opening the render.jsp file I see the following comment:
log.warn("@deprecated /libs/granite/ui/components/foundation/form/dropdown; please use /libs/granite/ui/components/foundation/form/select instead.");
Looking at the example here: https://helpx.adobe.com/experience-manager/using/creating-granite-datasource.html they are using "granite/ui/components/foundation/form/select"
Views
Replies
Total Likes
I hope it will help you - https://helpx.adobe.com/experience-manager/using/creating-granite-datasource.html but it is of type granite/ui/components/foundation/form/select
Views
Replies
Total Likes
Here is the Touch UI (Granite API) Reference. These types are listed:
http://docs.adobe.com/docs/en/aem/6-0/develop/ref/granite-ui/api/index.html
Views
Replies
Total Likes
Thank you both for your answers.
Regarding granite select vs dropdown: In both of them the value / defautValue properties didn't work. The reason i also tried to use 'dropdown' is because that the 'value' property is in the documentation, in the granite 'select' the documentation does say how to populate with initial value \ default value.
Regarding the datasource: From what I understand the datasource is used to fill the possible values of the dropdown, and not a default Value/ initial value.
Thanks,
AI
Views
Replies
Total Likes
Thanks, i was already aware of this URL.
But unfortunately this does not help me with my problem.
I was hoping that someone can help me from experience.
Thanks.
AI
Views
Replies
Total Likes
Views
Likes
Replies