You need to sign in to do that
Don't have an account?
Chinni 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>
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>