function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sgottreusgottreu 

Line Numbers when outputting Line Items

When I run the apex:repeat on the VisualForce page, I want to output a number that increments as a line number just like in the image above.

 

This is the code I am using to implemnt it.  However, it's not incrementing.

 

 


public class QuoteExtension {
    public Integer Getcounter() {
         return Counter;
    }

    public void Getincrementcounter() {
         Counter++;
    }

    Integer Counter = 0;

}
David VPDavid VP

Create a wrapper class for your object which has to properties : the number and your actual object itself.

Fill a list with those wrapper objects, each time setting the correct number and your objects.

 

Then you can display them with the correct number.

 

 

David

kool_akool_a

hey Scott,

 

Did you find a solution for this?. I am trying to avoid using a wrappe.

 

Thanks