i wan the checkbox to be checked & the radio button to be selected initially when displaying the page. How do i do it?
The checkbox & radio button are loaded in dataTable dynamically?
Any online tutorial for it?
-thanks.
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
0
Just preset the property behind the 'value' attribute. You can do that in for example the constructor of the bean.
okie, i have managed to set the checked for checkbox, but i having another problem.
i have 5 checkbox to display and 2 of them are checked initially. When i submit the form (with 2 default checked checkboxes), i can't get those checked values, my list size is 0.
When i select 1 more of the checkbox (2 default and 1 new) , the list size is 1.
You're binding the checkbox value of ALL rows with a single and the same bean property.
I think that it is obvious that every next row would overwrite the value of the previous row.
You need to bind the checkbox value to the row object in question, not to the parent bean.
lynn fann
Ranch Hand
Joined: Oct 15, 2006
Posts: 115
posted
0
When i set the code to the following, i can get the list size correctly.
but i need the layout to be 1 checkbox per row, the code above will display all the checkbox together.