So there is an xtype called 'checkbox'. When I apply this to a cq:wiget, the check box shows up in the dialog but the information doesn't get passed into the JSP. I was trying to make a checkbox that controls the input type of a html tag.
After looking around, I found that the proper way to create a checkbox is with a xtype set as 'selection' and type set as 'checkbox' and it works.The only thing I changed is the type and the xtype.
Here's how I'm using it in the JSP
<%final boolean checked= properties.get("checkbox", false);
request.setAttribute("checked", checked);%>
<input type = <c:out value="${checked?'text':'password'}"/>
I was wondering what's the difference between the two approaches, why doesn't the first approach work?
Aucun commentaire:
Enregistrer un commentaire