> if you name your properties like:
>
> getKey_Number
> setKey_Number

my getters and setters are right , I'm using torque generated om classes

>
> intake should not complain about it, but maybe the java.bean classes
> used to perform the introspection do not like the odd syntax.  _ are not
> used in java naming conventions.  I assumed the introspection just tried
> adding "get", "set", "is", maybe more to the property name and tested
> for a match.
> john mcnally

thats the error I get :

ERROR -- Property, salary_range for class, br.com.ibnetwork.ib.om.Research
could not be found.

 Exception:  java.lang.reflect.InvocationTargetException
 Stack Trace follows:
 java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
 at
org.apache.turbine.services.intake.model.Field.setProperty(Field.java:663)
 rethrown as org.apache.turbine.util.TurbineException: An exception
prevented the mapping to br.com.ibnetwork.ib.om.Research@121c0977
 at
org.apache.turbine.services.intake.model.Field.setProperty(Field.java:667)
 at
org.apache.turbine.services.intake.model.Group.setProperties(Group.java:365)
 at
br.com.ibnetwork.ib.modules.actions.ValidTest.doValidate(ValidTest.java:51)
 at java.lang.reflect.Method.invoke(Native Method)
 at
org.apache.turbine.util.velocity.VelocityActionEvent.executeEvents(VelocityA
ctionEvent.java:166)
 at
org.apache.turbine.util.velocity.VelocityActionEvent.perform(VelocityActionE
vent.java:114)
.
.
.

> Diogo Saad wrote:
> >
> > I'm using intake in my webapp to validate some form fields.
> > I get errors if I use _ (underscore caracter) in intake.xml
> >
> > Eg: mapToProperty="Key_Number"    DOES NOT WORK
> >        mapToProperty="KeyNumber"    WORKS
> >
> > <group name="Car" key="c" mapToObject="om.Car">
> > <field name="KeyNum" key="k" type="String" mapToProperty="Key_Number">
> >        <rule name="mask"  value="^([0-9]*)$">wrong syntax .</rule>
> >   </field>
> > </group>
> >
> > Is there a problem with intake and underscores or I'm not supposed to
use them anyway ??
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to