+ Start a Discussion

How to display each element of array on single visualforce page


I have arrayList and i want to display each element of list on different visualforce page.

For e.g accList[0] on one page and on click of next button accList[1] on another page and so on till the list get finish and also i want to implement previous button fuctionality.Like in below imageUser-added image
Sagar PareekSagar Pareek
Take a counter variable and on click of the button increase with +1 and try to access the list on the page .Make sure you render page every time user clicks on next button. 

I am not posting whole code , but this will help you to get idea.
public Integer counter {get;set;} //declaring the variable 

counter=0; // set this in the constructor

public void increaseCount(){ // bind this with your next button

 counter= counter+1; 


<!--- on your visualforce page use --->


Thanx but can u please explain me in detail.