yes, after i saw the exception, and looked at the code to find the exact
reason, i added the type
Johan Compagner wrote:
we try to do it:
if (object instanceof String)
{
// and that String is not empty
final String string = (String)object;
if (!Strings.isEmpty(string))
{
// and there is a non-null property type for the
component
final Class propertyType = propertyType(component);
if (propertyType != null)
{
// convert the String to the right type
object =
component.getConverter().convert(string, propertyType);
}
}
}
PropertyResolver.setValue(expression, modelObject, object,
component==null ? null:component.getConverter());
But if you use a compound/propertymodel as the texfields own root model
then the component isn't there
so the Session will be used.
Why don't you se the right type on the textfields? That is the prefered
way because the error is catched much earlier
and validators can work on the right object.
On 5/10/06, *Ittay Dror* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
i created a TextField, without setting its type, but with overriding
of getConverter(), i also used a CompoundPropertyModel
what happened is that this converter was not used in convert(), but
was used by the property resolver. inside the PropertyResolver code,
it threw an exception, which, was rethrown as InvocationException,
which was considered unexpected, and so the page was redirected to
the error page (rather than showing a conversion error)
ittay
--
===================================
Ittay Dror
Chief architect, openQRM TL,
R&D, Qlusters Inc.
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
+972-3-6081994 Fax: +972-3-6081841
http://www.openQRM.org
- Keeps your Data-Center Up and Running
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your
job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642>
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
<mailto:Wicket-user@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/wicket-user
--
===================================
Ittay Dror
Chief architect, openQRM TL,
R&D, Qlusters Inc.
[EMAIL PROTECTED]
+972-3-6081994 Fax: +972-3-6081841
http://www.openQRM.org
- Keeps your Data-Center Up and Running
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user