+ Start a Discussion

How to calculate the row values in apex:repeat

 Hi All


I have a VF Page which displays the values from different object as a table. I need to perform the row based calculation in that table. Please find below the example and help me out in solving this


Rl R2 Total  Total(%)
A  25 25 50

B  50 75 125
There are several ways to handle this.  You could do this in the client using JavaScript, or in the controller.  I'm guessing your VF is something like this, or maybe you're using a pageBlockTable, either way:

<apex:repeat value="{!objects}" var="nextObject">

Are you trying to calculate the Total(%)?