• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

selectBooleanCheckbox

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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:outputText value="Row#"/>
</f:facet>
<h:outputText value="#{srchlist.rowId}"/>
</t:column>
<t:column>
<f:facet name="header">
<h:outputText value="Project Name"/>
</f:facet>
<h:outputText value="#{srchlist.ProjNm}"/>
</t:column>
<t:column>
<f:facet name="header">
<h:outputText value="County/>
</f:facet>
<h:outputText value="#{County[srchlist.cntyId]}"/>
</t:column>
</t:dataTable>

Thanks
Adepu
[ September 28, 2006: Message edited by: Adepu ]
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry dude.. I tried but some how the listener method is not being called.. any idea???
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After changing name. Could you show your full JSP and Handler. And yeah dont make dumb mistake by not putting code inside <h:form
 
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
see https://coderanch.com/t/212177/JSF/java/RADIO-BUTTON-ROW-DATA-TABLE
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic