how to read checkbox/select in custommultifield from component jsp | Community
Skip to main content
Level 2
October 16, 2015
Solved

how to read checkbox/select in custommultifield from component jsp

  • October 16, 2015
  • 1 reply
  • 993 views

Hi Experts,

 

I have created a custommultifield which consist of checkbox, textfield and textarea. custommultifield can have maxitems 3.

I am facing problem while accessing the value of checkbox from component jsp.

I am doing this from jsp:

 

<c:set var="checkBox" value="${properties.parsysValue}" scope="request"></c:set>/*check box*/
<c:set var="learnmore" value="${properties.learnmore}" scope="request"></c:set>/*text field*/
<c:set var="findlocation" value="${properties.findlocation}" scope="request"></c:set>/*Text area*/

Whenever i do a add(+) in edit mode of component i get valkue's of textfield and textarea as a ARRAY and iterating over this array i could fetch the values for all three textfields and textarea. but this does not work with checkbox. i do not get an array of checkboxes. What i get is the string value of checkbox that is checked.

Even I changed checkbox to select(dropdown) but the problem that I face now is that dropdown does not retain value once the dialog is submitted and reopened again in edit mode.

I want to capture out of three how many checkbox have been checked or unchecked and need to apply a logic acoordingly.

Would like to know what is the appropriate way of getting checkbox value for all the three checkboxes that is the part of custommultifield.

 

Thanks

Sudeep
 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

Here is a community article that may help you. It talks about using a multifield with custom xtype and uses a check box:

http://cq.shishank.info/2011/12/19/multifield-with-custom-xtype/

Hope this helps you. 

1 reply

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

Here is a community article that may help you. It talks about using a multifield with custom xtype and uses a check box:

http://cq.shishank.info/2011/12/19/multifield-with-custom-xtype/

Hope this helps you.