Hello all,
I think there is something wrong with the "updateValue"
method in net.sf.tapestry.form.TextField.java
public void updateValue(String value)
{
valueBinding.setString(value)
}
I bump in to this because I have a TextField which is bound
to a "int" property and when I try to update it I get a
"java.lang.IllegalArgumentException"
In my particular case I changed it to
public void updateValue(String value)
{
valueBinding.setInt(Integer.parseInt(value));
}
and it worked fine... but this is no good.
I'm thinking that it should be something like:
( pseudo-code, I don't know how to do it for real )
public void updateValue(String value)
{
switch (valueBinding.getType())
case "Integer" :
valueBinding.setInt(Integer.parseInt(value));
case "Boolean" :
valueBinding.setBoolean(Boolean.getBoolean(value));
case "Double" :
valueBinding.setDouble(Double.parseDouble(value));
default : valueBinding.setString(value);
}
Did I make any sense?
Regards,
Luis Neves
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer