| Author |
selectBooleanCheckbox
|
Yellapa Adepu
Ranch Hand
Joined: Jan 17, 2006
Posts: 34
|
|
Hi Friends, I have a table to display with multiple rows. I am using selectBooleanCheckbox to display a check box as a first column of each row. My requirement is I need to capture the details of selected row say e.g row ID. It is displaying a check box for each row, but I am not sure how capture the selected rows in backing bean. Any help would be appreciated. <t:dataTable id="list" value="#{ActionBean.cmplList}" var="srchlist" width="100%"> <t:column> <h:selectBooleanCheckbox binding="#{ActionBean.checkBox}" value="#{srchlist.rowId}"/> </t:column> <t:column> <f:facet name="header"> <h utputText value="Row#"/> </f:facet> <h utputText value="#{srchlist.rowId}"/> </t:column> <t:column> <f:facet name="header"> <h utputText value="Project Name"/> </f:facet> <h utputText value="#{srchlist.ProjNm}"/> </t:column> <t:column> <f:facet name="header"> <h utputText value="County/> </f:facet> <h utputText value="#{County[srchlist.cntyId]}"/> </t:column> </t:dataTable> Thanks Adepu [ September 28, 2006: Message edited by: Adepu ]
|
Yellapa Adepu<br />SCEA
|
 |
Sajan Patel
Ranch Hand
Joined: Oct 25, 2004
Posts: 77
|
|
I think I am guessing very wild here but Can you use try following And in Your Handler class So whenever someone click that Check box you will get request in your handler. Problem with is that page will execute each time someone click that check box. I hope this help you
|
 |
Yellapa Adepu
Ranch Hand
Joined: Jan 17, 2006
Posts: 34
|
|
|
sorry dude.. I tried but some how the listener method is not being called.. any idea???
|
 |
Gregg Bolinger
Ranch Hand
Joined: Jul 11, 2001
Posts: 15230
|
|
Welcome to JavaRanch Adepu We don't have too many rules around here but we do have a Naming Policy. Please adjust your display name accordingly. You can do so by clicking here. This is not a suggestion. This is a requirement. Thanks a bunch. [ September 28, 2006: Message edited by: Gregg Bolinger ]
|
 |
Sajan Patel
Ranch Hand
Joined: Oct 25, 2004
Posts: 77
|
|
|
After changing name. Could you show your full JSP and Handler. And yeah dont make dumb mistake by not putting code inside <h:form
|
 |
Richard Green
Ranch Hand
Joined: Aug 25, 2005
Posts: 536
|
|
|
see http://www.coderanch.com/t/212177/JSF/java/RADIO-BUTTON-ROW-DATA-TABLE
|
MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
|
 |
 |
|
|
subject: selectBooleanCheckbox
|
|
|