Nval Betawi wrote:Hi Y'ALL:
I wonder if anyone can help. I am migrating from Struts-1 to Struts-2, and have problem with Struts-2 Checkbox. The idea is that, I have a List that contains a list of beans (CourseBean). One field inside the CourseBean is "selected", which is a boolean - along with its set/get. When my JSP iterates thru the List to display each CourseBean into rows, each row will have a checkbox where I can check/uncheck. Doing so, I need Struts-2 to call CourseBean.setSelected() to true or false. The problem is, Strut-2 never invokes the setSelected() method, while it does execute the CourseBean.getSelected() because the original value is displayed (true or false).
I know something must be missing in my process because this cannot be a bug in Struts-2. Please HELP, I will appreciate it.
Here is some code snippet:
* BEAN-1 *
* BEAN-2 *
* JSP - I tried two different ways to define the checkbox tag, but none works *
[Post New]posted Sunday, June 21, 2009 9:38:29 AM private message
After further investigation, research and debugging: This is indeed Struts 2 DEFECT for release 2.1.16 (which was one I used). We resolved the issue by modifying the CheckboxInterceptor.java class. Thanks to Tim Stavenger for his idea: "