Re: [Actionframework-users] another enhancement request - checkboxes and multiple select
Status: Inactive
Brought to you by:
ptoman
From: Petr T. <Pet...@pi...> - 2002-11-09 10:29:53
|
> I'd like to be able to declare a java method like > doSomething(String[] dog) which would handle: > > <input type="checkbox" name="dog" value="beagle"/> <input > type="checkbox" name="dog" value="spitz"/> > > but that doesn't work because if no dogs are selected, "dog" doesn't > show up at all on the query string. If I have an array argument, it > should allow for no members. PS: presently, there is a solution for this using <input-variable>: <action name="/doSomething" method="doSomething(String[] dog)"> <input-variable name="dog" value="[]" if="!$dog"/> ... </action> This would set dog="empty array" if it is not set in the request. Petr -- [ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ] |