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 18:13:40
|
> 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.
I'm sorry, this only creates array of length 1. Here's a correction:
<input-variable name="dog" component="Util" value="getEmpty()"
if="!$dog"/>
Where Util is a component that has a method:
public class Util {
private static final String[] array = new String[0];
public String[] getEmpty() {
return array;
}
}
Petr
--
[ http://dione.zcu.cz/~toman40 - Pet...@pi... - ICQ=22957959 ]
|