This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Check box column trouble

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !

I am new with rich faces.
What i am trying to do now is adding a check box column to a rich extended data table, i did this adding a new column with a h:selectBooleanCheckbox inside of it.
The trouble is that i could not syncronize my check box selection with onRowClick event of table, an example could be when i deselect a table row the check box still remain selected. I am trying to solve this issue using just control components without using beans logic (i don't know if this is right).

Please if you know some tutorials explaning how to add a check box column to a extended data table or if there are some properties or events of table that could help me, give me a feed back.

Should i use some JavaScript to solve my trouble ?

<rich:extendedDataTable>
...
<rich:column width="8%" styleClass="checkBoxColum>
<h:selectBooleanCheckbox value="true" />
</rich:column>
...
</rich:extendedDataTable

Thanks,
Radu
 
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"radu radu", please check your private messages for an important administrative matter.
 
Radu Mircea
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could anyone tell me an ideea how to do it without javascript ?

Please if you have an idea tell me.

Thanks,
Radu
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no idea how to implement the synchronization without using bean logic.

I wrote some codes with bean logic. Hope it helpful. By the way, I am also newbie in RichFaces. If anything wrong with my codes, please help to advise.

Thanks!

For POJO Bean:



For managed bean:



For JSP Page:
 
Radu Mircea
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi !

Thanks a lot for your example, i studied it and is really meaningful also now i try to put it in practice in my application.

In my case i do not have a Boolean property on my object, and i could not to add one, so i create a new object witch has only that boolean property, also i don't have access to table's collection in java classes i must access them through spring web flow i guess.
Now i try to make the above changes.

Best regards,
Mircea
reply
    Bookmark Topic Watch Topic
  • New Topic