I have a dynamic form with groups of input fields (string fields, integer fields, double fields .etc.).
If I validate these fields with struts validator, then the Validator Class throws the Exception: java.lang.NoSuchMethodException: Property 'string' has no getter method.
Has somebody an idea what a did wrong or has somebody another solution for validating groups of input fields? (The number and types of all the fields are dynamic)
Here is my example JSP: ------------------------------------------------ <html:form action="/UserAttributesWrite.do">
<html:text property="string(1000)" />
<html:text property="string(1001)" />
<html:text property="integer(1002)" />
<html:text property="decimal(1003)" />
<html:text property="integer(1004)" />
<html:text property="string(1005)" /></html:form>
Here is my ActionForm: ---------------------------------------------- private HashMap string = new HashMap(); private HashMap integer = new HashMap(); private HashMap decimal = new HashMap();
public void setString(String key, Object value) {
string.put(key, value);
}
public Object getString(String key) {
return string.get(key);
}
public void setInteger(String key, Object value) {
integer.put(key, value);
}
public Object getInteger(String key) {
return integer.get(key);
}
public void setDecimal(String key, Object value) {
decimal.put(key, value);
}
public Object getDecimal(String key) {
return decimal.get(key);
}
Thats part of my validate.xml -------------------------------------------------------- <form name="UserAttributesForm">
<field property="integer" depends="integer">
<arg0 key="integer" />
</field>
<field property="decimal" depends="float">
<arg0 key="decimal" />
</field> </form>
Thanks Yusuf
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

