You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`@Model(adaptables = Resource.class )
public class CtaButton implements JacksonSerializable {
@DialogField(fieldLabel="Visible", fieldDescription = "Check to make CTA Button visible")
@CheckBox(inputValue = "true", title = "Visible", text = "Check to make CTA Button visible")
@Inject @Optional
private Boolean visible = false;
...
}
`
Note, that name is not specified explicitly. Generated XML for the Classic UI is OK:
<visible allowBlank="{Boolean}true" checked="{Boolean}false" disabled="{Boolean}false" fieldDescription="Check to make CTA Button visible" fieldLabel="Visible" hideLabel="{Boolean}false" inputValue="true" jcr:primaryType="cq:Widget" name="./ctaButton/visible" xtype="checkbox"/>
For Touch UI:
<visible cq:hideOnEdit="{Boolean}false" cq:showOnCreate="{Boolean}true" disabled="{Boolean}false" fieldDescription="Check to make CTA Button visible" fieldLabel="Visible" jcr:primaryType="nt:unstructured" name="ctaButton/" renderReadOnly="{Boolean}true" required="{Boolean}false" sling:resourceType="granite/ui/components/foundation/form/checkbox" text="Check to make CTA Button visible" title="Visible"/>
Note, that 'visible' is not appended to 'ctaButton/' and there is no leading './'. However, name is set properly when there is no namePrefix in DialogFieldSet but values are then stored on upper level which is not always desired.
Workaround is to specify the field name explicitly, like: name='./visible'
Tried with 4.1.2 and cloned from develop branch.
The text was updated successfully, but these errors were encountered:
I have a complex field declared in a component's model:
@DialogField @DialogFieldSet(namePrefix = "ctaButton/", title = "CTA Button", collapsible = true) @Optional @Inject private CtaButton ctaButton;
This class has fields declared like:
`@Model(adaptables = Resource.class )
public class CtaButton implements JacksonSerializable {
}
`
Note, that name is not specified explicitly. Generated XML for the Classic UI is OK:
<visible allowBlank="{Boolean}true" checked="{Boolean}false" disabled="{Boolean}false" fieldDescription="Check to make CTA Button visible" fieldLabel="Visible" hideLabel="{Boolean}false" inputValue="true" jcr:primaryType="cq:Widget" name="./ctaButton/visible" xtype="checkbox"/>
For Touch UI:
<visible cq:hideOnEdit="{Boolean}false" cq:showOnCreate="{Boolean}true" disabled="{Boolean}false" fieldDescription="Check to make CTA Button visible" fieldLabel="Visible" jcr:primaryType="nt:unstructured" name="ctaButton/" renderReadOnly="{Boolean}true" required="{Boolean}false" sling:resourceType="granite/ui/components/foundation/form/checkbox" text="Check to make CTA Button visible" title="Visible"/>
Note, that 'visible' is not appended to 'ctaButton/' and there is no leading './'. However, name is set properly when there is no namePrefix in DialogFieldSet but values are then stored on upper level which is not always desired.
Workaround is to specify the field name explicitly, like:
name='./visible'
Tried with 4.1.2 and cloned from develop branch.
The text was updated successfully, but these errors were encountered: