Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JSF Datatable Show/Hide Rows

843842Dec 28 2006 — edited Jan 25 2009
Hi All,

I am new to JSF & trying to use it on my project.

My requirement is as follows

I have Collection of Order and inside each order there is a collection of OrderLine

On page intially I display only Orders & there is a Expand button in front of every order. This is a toggle button.
When clicked for first time
I need to display the order lines for that order.
When clicked again
I need to hide them

I don't want to refresh the page on the button click instead I want to use javascript to show/hide the child rows.

So intially the style for orderline rows will be display="none" when clicked on the expand button using the row ids of the orderline rows set the style display="block"

As far as I have read you cannot assign a style to a row depending on the the condition and also you cannot assign id to the rows so that thoes ID's can be used in javascript to show/hide the rows

Is there any way to achieve this?

Thanks & Regards,
Sush
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2009
Added on Dec 28 2006
14 comments
4,994 views