Hi guys. Here is my problem. We have the text field (struts html:text) wich shoud show the variable from the form. Befor the form is populated this variable is formatted, based on if it is negative or positive. If it is negative it comes in as <font color="#AF0B1C">(184,548.93)</font>. Of course in the text it is looks the same. I tried to set the page scoped variable and than use it in the html:text tag:
but it does not work. The page scoped variavle val still looks as <font color="#AF0B1C">(184,548.93)</font>. So, nested <c ut tag with the escapeXml does not work. (whit hte <bean:write ... filter="false"/> the same situation) What can I do if I need the text field in which I have to show parsed variable.
The cut "escapeXML" is equivalent to the bean:write "filter". When printing a value it escapes any special "HTML" characters such as < & or >, making them <, > and &
It seems you are trying to extract the value, without its markup text. The escapeXML tag will not help here. Probably the best approach would be to have two methods on the form bean. One to get the value, one to get the formatted value (if you insist on doing the formatting in the bean) [ April 20, 2006: Message edited by: Stefan Evans ]