Visualforce Page:
<apex:page StandardController="Account" extensions="insertrecordscls1" recordsetVar="accs">
<Apex:form >
<apex:pageblock >
<apex:Pageblocktable value="{!accs}" var="a">
<apex:column headerValue="Contact">
<apex:commandLink value="{!a.name}" rerender="out" status="stat">
<apex:Param value="{!a.id}" name="p1"/>
</apex:CommandLINk>
</apex:Column>
<apex:column value="{!a.phone}"/>
</apex:pageblocktable>
</apex:pageblock>
<apex:CommandLink value="Previous" action="{!previous}"/>
<apex:CommandLink value="Next" action="{!next}"/>
<br/>
<div align="center">
<apex:outputPanel id="out" >
<apex:actionStatus id="stat" >
<apex:facet name="start">
<apex:image value="{!$Resource.loading}" style="width:200px;height:200px"/>
</apex:facet>
<apex:facet name="stop">
<apex:detail subject="{!$CurrentPage.parameters.p1}" inlineEdit="true" relatedList="false"/>
</apex:facet>
</apex:actionStatus>
</apex:outputPanel>
</div>
</Apex:form>
</apex:page>
Apex Class:
public with sharing class insertrecordscls1 {
public insertrecordscls1(ApexPages.StandardSetController controller) {
controller.setPageSize(5);
}
}
<apex:page StandardController="Account" extensions="insertrecordscls1" recordsetVar="accs">
<Apex:form >
<apex:pageblock >
<apex:Pageblocktable value="{!accs}" var="a">
<apex:column headerValue="Contact">
<apex:commandLink value="{!a.name}" rerender="out" status="stat">
<apex:Param value="{!a.id}" name="p1"/>
</apex:CommandLINk>
</apex:Column>
<apex:column value="{!a.phone}"/>
</apex:pageblocktable>
</apex:pageblock>
<apex:CommandLink value="Previous" action="{!previous}"/>
<apex:CommandLink value="Next" action="{!next}"/>
<br/>
<div align="center">
<apex:outputPanel id="out" >
<apex:actionStatus id="stat" >
<apex:facet name="start">
<apex:image value="{!$Resource.loading}" style="width:200px;height:200px"/>
</apex:facet>
<apex:facet name="stop">
<apex:detail subject="{!$CurrentPage.parameters.p1}" inlineEdit="true" relatedList="false"/>
</apex:facet>
</apex:actionStatus>
</apex:outputPanel>
</div>
</Apex:form>
</apex:page>
Apex Class:
public with sharing class insertrecordscls1 {
public insertrecordscls1(ApexPages.StandardSetController controller) {
controller.setPageSize(5);
}
}
No comments:
Post a Comment