struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Klein <>
Subject Formatted output within a nested iterate loop
Date Sun, 12 Jan 2003 21:59:40 GMT

I currently have a nested iterate loop which looks like the following:

<nested:iterate id="liabilities" name="OverviewForm"
indexId="liabilityIndex" property="liabilities">
  	<tr id="lib_<%=liabilityIndex%>_Header" class="appSubHeader">
		<td valign="MIDDLE">
			<nested:text name="liabilities"
property="unpaidBalance" />
</nested iterate>

This works fine, but the "unpaidBalance" field really needs to be formatted
like this: $100,000.00 instead of 100000.0

Since the text tag doesn't directly support a format field, I generally use
this trick:

<input type="text" name="loan.FFFCFee" size="8" maxlength="150"
value="<bean:write name="overviewForm" property="loan.FFFCFee"
format="###,###.00" /> ">

The "value" field is used to supply the necessary formatting capability.

but the following doesn't seem to work:

<nested:text name="liabilities" property="unpaidBalance"
value="<nested:write name="liabilities" property="unpaidBalance"
format="###,###,###.00" />" />

and only generates the following error message:

	Error: Attribute: liabilities" is not a valid attribute name 

Any help would be appreciated.
Thanks, Norman

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

View raw message