Hello Matt,

Check the last night build - I just commit fix for it.

Wednesday, March 06, 2002, 4:18:47 AM, you wrote:

MR> I've encountered a possible bug in the use of formatKey in <bean:write>. As
MR> always it's more likely to be my error but I'd appreciate it if anyone could
MR> have a look. I'm running the latest nightly build of struts.

MR> Code snippets are below but to summarise, I'm using the <bean:write> tag and
MR> formatKey attribute in my JSP to refer to 3 different format keys in my
MR> resource file. However all my values are being formatted using the
MR> format.dollars key if the resource file entries are as below. If I remove
MR> format.dollars then I get the strings formatted as percentages, etc. I.e.
MR> only one format string is ever used. All my properties return datatype
MR> "double" which I assume is something to do with the problem but I'm not sure
MR> what. Why can't I format 4 different properties in 4 different ways using 4
MR> different format keys?

MR> Thanks,
MR> Matt.

MR> In a JSP file I have this snippet:

MR> <logic:iterate id="item" name="player" property="portfolio">
MR>         <tr>
MR>                 <td><bean:write name="item" property="desc" /></td>
MR>                 <td><bean:write name="item" property="quantity" /></td>
MR>                 <td><bean:write name="item" property="value" 
formatKey="format.dollars"
/>></td>
MR>                 <td><bean:write name="item" property="totalStrength"
MR> formatKey="format.int" /></td>
MR>                 <td><bean:write name="item" property="totalDefense" 
formatKey="format.int"
/>></td>
MR>                 <td><bean:write name="item" property="change"
MR> formatKey="format.percentage" /></td>
MR>         </tr>
MR> </logic:iterate>

MR> In my ApplicationResource.properties file I have this snippet:

MR> format.int=0
MR> format.dollars=$0.00
MR> format.percentage=0.00%


MR> --
MR> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
MR> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



-- 
Best regards,
 Oleg                            mailto:[EMAIL PROTECTED]



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to