Views
Replies
Total Likes
Yes, it is possible, please check
https://github.com/arunpatidar02/aem63app-repo/blob/master/java/DemoDailogDropdown.java
thanks @Himanshu_Jain
I tried both sites but it's not setting default values
Hi @naruk89179065 ,
I believe you are using
sling:ResourceType: granite/ui/components/foundation/form/select
In that case, you can use cq:template node to set initial default values for any kind of select datasource, textfield, radiogroup, checkbox etc. resource type.
Just add cq:template node inside AEM component.
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" jcr:primaryType="nt:unstructured" <jcrPropertyName>="<default value here>"/>
Hope that helps you!
Regards,
Santosh
It really depends on which granite UI field are you targeting. Typically you will add an extra property to the XML configuration.
But here's a quick run down for which property sets a default value for which Granite UI fields that you are targeting:
Checkout the full guide, cheat sheet reference guide which include code examples and pre-configured touch UI - https://sourcedcode.com/blog/aem/aem-granite-ui-1-0-form-components-xml-cheat-sheet-reference-guide
Yes, it is possible, please check
https://github.com/arunpatidar02/aem63app-repo/blob/master/java/DemoDailogDropdown.java
Views
Likes
Replies