Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Check box column trouble

 
Radu Mircea
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Wei Geng
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic