File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Check box column trouble Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Check box column trouble" Watch "Check box column trouble" New topic

Check box column trouble

Radu Mircea
Ranch Hand

Joined: Jun 14, 2009
Posts: 45
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:column width="8%" styleClass="checkBoxColum>
<h:selectBooleanCheckbox value="true" />

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63867

"radu radu", please check your private messages for an important administrative matter.

[Asking smart questions] [About Bear] [Books by Bear]
Radu Mircea
Ranch Hand

Joined: Jun 14, 2009
Posts: 45
Could anyone tell me an ideea how to do it without javascript ?

Please if you have an idea tell me.

Wei Geng

Joined: Dec 10, 2004
Posts: 28
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.


For POJO Bean:

For managed bean:

For JSP Page:
Radu Mircea
Ranch Hand

Joined: Jun 14, 2009
Posts: 45
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,
I agree. Here's the link:
subject: Check box column trouble
It's not a secret anymore!