struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Łukasz Lenart <>
Subject Re: conversion error repopulation not working
Date Thu, 31 May 2012 11:48:32 GMT
2012/5/31 Łukasz Lenart <>:
> Ok, looks like a problem is with getText() in jsp but I think there is
> no other way ... you can use String instead and check for errors in
> getter/setter but I'm not sure if it does the trick

The problem is a bit complicated here as getText(String key, String[]
args) accepts only strings, so getText("format.number", {user.born})
is converted to call getText("{0,number,#,##0.#}", String[]{"1980"}) -
notice that all params are Strings - and then MessageFormat throws
exception as it cannot format String as a Number.

Right now I don't see any bright solution, I think there should be a
short-circuit when conversion error occurs to  skip evaluating
getText() expression and just return what was specified as a key /
name property.

mobile +48 606 323 122
Warszawa JUG conference - Confitura

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message