Ciao Ragazzi,
Come dal titolo ho un problema con la tag from di spring <form:input tag.
di sotto ho una classe che raggiude di per se il problema
codice:public class ArrayOfProperty{ private String[] test = {"1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1","1"}; public String getpropertydatalabel(int id){ return this.test[id]; } public void setpropertydatalabel(int id,String value){ this.test[id] = value; } }
quando nella jsp scrivo <form:input path="propertydatalabel[1]" size="1" maxlength="200" lang="en" dir="ltr" /> mi lancia questa exception
org.springframework.beans.NotReadablePropertyExcep tion: Invalid property 'propertydatalabel[1]' of bean class [com.generalstudios.ArrayOfProperty]: Bean property 'propertydatalabel[1]' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
org.springframework.beans.BeanWrapperImpl.getPrope rtyValue(BeanWrapperImpl.java:540)
org.springframework.beans.BeanWrapperImpl.getPrope rtyValue(BeanWrapperImpl.java:532)
Purtroppo ho la netta sensazione ci sia una sorta di constrain, cioe il getter method non accetta parametri e il setter accetta solo un parametro dello stesso tipo del return type del relativo getter.
Qualcuno sa darmi qualche hint?
Grazie mille.

Rispondi quotando
