Quantcast
Channel: Adobe AEM CQ tips » AEM/CQ5
Viewing all articles
Browse latest Browse all 8

Create dialog with checkbox in Adobe AEM/CQ5

$
0
0

Problem

How to create component dialog in Adobe AEM/CQ5 that contains checkbox and how to obtain it’s value(determine if it is or is not checked).

Solution

Add this into you dialog.xml

<prop1
    jcr:primaryType="cq:Widget"
    fieldDescription="My description"
    fieldLabel = "My label"
    name="./checkTest"
    type="checkbox"
    xtype="selection"/>

And in JSP you can obtain the checkbox value like this.

boolean isChecked = properties.get("checkTest", false);

Viewing all articles
Browse latest Browse all 8

Trending Articles