when using JSF, some scenarios are difficult to deal with.
e.g. 1. multi rows raido buttons in dataTable
2. multi columns radio buttons in dataTable
The radio buttons don't fall in the one radio group, so they don't behave as one radio group
Solution: create customize component
step1, inherit and implement component class
add one overrideName field, so we can override the radio names generated by radio button. In this way, multi-row or column radios are considered in one radio group
step2, inherit and implement render class
override Decode(apply request phase, retrive the value from request obj and apply to component)
override Encode(render response phase)
step3, customize tag lib
http://www.javaworld.com/javaworld/jw-02-2007/jw-02-jsf.html?page=2
e.g. 1. multi rows raido buttons in dataTable
2. multi columns radio buttons in dataTable
The radio buttons don't fall in the one radio group, so they don't behave as one radio group
Solution: create customize component
step1, inherit and implement component class
add one overrideName field, so we can override the radio names generated by radio button. In this way, multi-row or column radios are considered in one radio group
step2, inherit and implement render class
override Decode(apply request phase, retrive the value from request obj and apply to component)
override Encode(render response phase)
step3, customize tag lib
http://www.javaworld.com/javaworld/jw-02-2007/jw-02-jsf.html?page=2