Hello:
I am trying to validate that at least ONE item has been selected from a
selection box using Intake. Is this possible? The selction list has one or
more items in it and the user can perform multiple selctions from those
items. I tried the following, but I dont get an error if nothing is
selected.
<select name="$createUserAccountGroup.Catalog.Key" multiple size="4">
#foreach ($catalog in $catalogList)
<option>$catalog</option>
#end
</select>
The corresponding intake field is:
<field name="Catalog" key="Catalog" type="String" multiValued="true">
<rule name="required" value="true">A catalog(s) selection is
required</rule>
<rule name="mask" value="^[A-Z]+">Please select a valid catalog
name</rule>
</field>
Als if and when this works, how do I read the values selected in my action
class? See below
try
{
createUserAccountGroup = intake.get("Createuseraccount",
IntakeTool.DEFAULT_KEY);
}
catch (Exception e)
{
System.out.println("Unable to get Createuseraccount group. " +
e.getMessage());
}
try
{
java.lang.reflect.Array catalogs = (java.lang.reflect.Array)
createUserAccountGroup.get("Catalog").getValue();
System.out.println(catalogs);
}
catch (Exception e)
{
........
}
Also, is there a definition of 'NumberKey', 'StringKey', and 'ComboKey'
types as shown in intake.dtd?
Thanks.
Dan
Dan Eyassu
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>