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
Chinni reddyChinni reddy 

I wrote Page Reference in visual force ,then it is not showing any output what happing, can u please check it my code

Hi sir/Madam,
I wrote Page Reference  in visual force ,then it is not showing any output  what happing.
Know i am sedding apex code and Visual force Code.

public class RamanjiPagination {
    public integer num{get;set;}
    public RamanjiPagination(){
        num=0;      
    }
    public PageReference myMethod(){
        PageReference p=new PageReference('/apex/RamanBasic');
        return p; 
    }
    public void nextMethod(){
        num=num+5;
    }
    public void previous(){
        num=num+5;
    }
    public List<Account>getAcc(){
        Return[Select id,Name,Phone from Account limit 5 offset:num];
    }
}

=================================================
<apex:page controller="RamanjiPagination">
    <apex:form>
        <apex:pageBlock title="Pagination">
            <apex:commandButton value="PageReference" action="{!myMethod}"/><br/>
            <apex:pageBlockTable value="{!acc}" var="a">
                <apex:column value="{!a.id}"/>
                <apex:column value="{!a.Name}"/>
                <apex:column value="{!a.Phone}"/>
            </apex:pageBlockTable>
            <apex:commandButton value="Previous" action="{!Previous}"/>
             <apex:commandButton value="Next" action="{!nextMethod}"/>
        </apex:pageBlock>
    </apex:form>
</apex:page>