Hello,

G.L. Grobe wrote:
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
<input type="checkbox" name="toolItem($set.name)" value="$toolItem($set.name)">$set.name

--- webwork action
// get's called when view page is loaded
public String getToolItem() { return item; }

// I thought should be called when the view form is submitted, but doesn't
public void setToolItem(String tool) {
// ... start collecting tool params each time this method is called
}
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.

Hope this helps,
-Bill



-------------------------------------------------------
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


Reply via email to