Action Region:
<apex:page
controller="ActionExample">
<apex:form>
<apex:pageBlock
title="PageBlock" id="one">
<apex:pageBlockSection>
<apex:actionRegion>
<apex:pageBlockSectionItem>
<apex:outputLabel
value="Enter Name" />
<apex:inputText
value="{!name}">
<apex:actionSupport event="onchange"
action="{!show}" reRender="one" />
</apex:inputText>
</apex:pageBlockSectionItem>
</apex:actionRegion>
<apex:pageBlockSectionItem>
<apex:outputLabel
value="Enter Branch" />
<apex:inputText
value="{!branch}" />
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
public class ActionExample {
public String name {set;get;}
public String branch {set;get;}
public void show(){
}
}
ActionPooler:
<apex:page
controller="ActionExample">
<apex:form id="one">
<apex:pageBlock id="pb">
{!result}<br/>
{!count}
<apex:actionPoller action="{!getData}"
interval="10"
reRender="pb"/>
</apex:pageBlock>
</apex:form>
</apex:page>
public class ActionExample {
public String name {set;get;}
public String branch {set;get;}
public String result {set;get;}
public Integer count {set;get;}
public ActionExample(){
result='Data & Time :'+System.now();
count=0;
}
public void getData(){
count=count+1;
result='Data & Time :'+System.now();
}
}
Insert ,define ,composition:
Firstpage Name : TemplatePage
<apex:page>
<apex:form>
<apex:pageBlock
title="PageBlock">
<apex:commandLink action="/apex/ActionRegion"
value="Click" />
<apex:insert
name="header" />
</apex:pageBlock>
</apex:form>
</apex:page>
Second page:”
<apex:page >
<apex:composition template=" TemplatePage ">
<apex:define name="header"><br/>
<apex:outputLink value="/apex/page1" >
Delete</apex:outputLink>
</apex:define>
</apex:composition>
<apex:pageBlock title="PageBlock2" >
This is block 2
</apex:pageBlock>
</apex:page>
EnhancedListView:
<apex:page >
<apex:enhancedList type="Account"
rowsPerPage="10" height="600" width="200"/>
</apex:page>
Related List :
<apex:page
standardController="Account" >
<apex:relatedList list="Cases" title=" Cases"
/>
<apex:relatedList list="Contacts" title="Contact"
/>
</apex:page>
No comments:
Post a Comment