I am having an issue with displaying the original value entered on a form after failed type conversion. This "bug" is caused by my use of getText() in the form value fields. I'm curious how one solves this issue for making sure the field is formatted correctly upon display, but also making sure the users see the orignal malformed entry after failed type conversion. I have a few examples below. The last one displays works the way it should. The top two only present an empty field upon failed type conversion.
[code snippets] <!-- "convert to java.util.Date": Will NOT display the incorrectly entered date --> <s:textfield key="xaction.closedDate" value="%{getText('format.dateShort',{xaction.closedDate != null ? xaction.closedDate :''})}" /> <!-- "convert to BigDecimal": Will NOT display the incorrectly entered number --> <s:textfield key="xaction.listPrice" value="%{getText('format.money',{xaction.listPrice != null ? xaction.listPrice :''})}"/> <!-- "convert to Integer": Will display the incorrect value --> <s:textfield key="xaction.beds" /> --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org