JSF Datatable Show/Hide Rows
843842Dec 28 2006 — edited Jan 25 2009Hi 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