You can do the multiplication in your bean WBConttBO, rather than in the
jsp. Or you can use jstl in your jsp, which supports multiplication of
two bean properties. Like: <c:out value="${x*y}" />


Saul

-----Original Message-----
From: Srinivas Kusunam [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 07, 2003 2:12 PM
To: <"Struts Users Mailing List"
Subject: Multiplying 2 columns on JSP page


I have a Collection Object (collection of  OWBOReadFacade objects) in my
session scope. For every object in the collection I have to multiply
fld1 * fld2 and display on JSP. What is the best way or ways to do
this???
Here is the sample code::::: 

<logic:iterate id="contAList" name="WBConttBO" scope="session"
indexId="index">
         <bean:define id="wbpBRFacade" name="contAList" scope="page"
type="com.proj.OWBOReadFacade"/>
        <tr>
        <td class="text" align="left">
                  <bean:write name="wbpBRFacade"
property="wbpAgreementNumber"/>
        </td>
        <td class="text" align="right">
                 <bean:write name="wbpBRFacade" property="wbpAcreage"/>
        </td>
        <td class="text" align="right">
               <bean:write name="wbpBRFacade"
property="wbpRentalRatePerAcre"/>                                       
        </td>
        <td align="right">
              FIELD1 * FIELD 2         I.e. (wbpAgreementNumber *
wbpRentalRatePerAcre)
        </td> 
         </tr>
</logic:iterate>



I appreciate any suggestions.

Thanks.


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


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

Reply via email to