I saw the page you mentioned and it's a *.jsp and my forms are velocity
(*.vm) views. So if I'm doing anything wrong in the *.vm page, I can't
tell. I did change the types to arrays like you have below w/ no luck.
Anyone have ideas or comment further on what I might be doing wrong
here. I have a velocity view that creates many checkbox's after a
dbase query. The getter method in my webwork action is called but the
setter method (which I expect to be called for each checkbox on
submittal) isn't.
--- my.vm
makes more sense if I post the loop code ...
#foreach ( $set in $toolsList )
<input type="checkbox" name="$toolItem($set.name)">$set.name
#end
--- webwork action
And changes to the action ...
// gets called when view page is loaded
public String[] getToolItem() { return items; }
// I thought should be called when the form is submitted, but doesn't
public void setToolItem(String[] tools) {
this.items = tools;
}
This question came up before and I seem to recall using an array was
the answer:
public String[] getToolItem() { return item; }
public void setToolItem(String[] tool) {
// ... start collecting tool params each time this method is
called
}
Found the formtest example handles checkboxes. See
src/main/webwork/examples/FormTest.java.
-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork