icfnext / cq-component-maven-plugin

Other
22 stars 35 forks source link

Support of @Hidden annotation for TouchUI #62

Open pete-by opened 7 years ago

pete-by commented 7 years ago

Generation of "granite/ui/components/foundation/form/hidden" form field is not supported for TouchUI. Nothing is produces by the code below:

@Hidden @DialogField(name = "./showControls@TypeHint", value = "Boolean")
default String isShowControlsType() { return "Boolean"; } 

Expected output of the plugin:

<showControls cq:hideOnEdit="{Boolean}false" cq:showOnCreate="{Boolean}true" 
    disabled="{Boolean}false" jcr:primaryType="nt:unstructured" 
    name="./showControls@TypeHint" renderReadOnly="{Boolean}true" 
    required="{Boolean}false" sling:resourceType="granite/ui/components/foundation/form/hidden"
    value="Boolean" 
/>

Workaround: adding a sling:resourceType explicitly helps but it makes declarations cumbersome.