We explained rendered, reRender and renderAs attribute in the visualforce page. This article is effective to you can use visual force page.
Rendered : –
This attribute uses in all visual force components. It will return output depend on boolean value. The default value is true.
The below code to check active account, show result if only the condition becomes true.
Code –
<apex:outputLabel rendered=”{!if(AND(Account.AccountNumber!=”,Account.Active__c==’Yes’),true,false)}”>{!aa.Name}</apex:outputLabel>
RenderAs : –
This attribute useful to display visual force page as PDF view.
For example, customer needs to display invoice preview, job preview as pdf template on each record. In that situation, you can use the below code.
Code –
<apex:page standardController=”Account” renderAs=”pdf”>
reRender : –
This attribute is used to refresh visual-force page components in the visual force page. Which is a wonderful concept in real time? Partially refresh action done by this attribute. So no need to reload full page. The below example shows to refresh part of the component whenever a specified event occurs. More than one component to refreshed, they are separated by commas [example -tbl,cn].
Code –
<apex:inputText value=”{!txtval}”>
<apex:actionSupport event=”onclick” action=”{!selval}” reRender=”tbl,cn“/>
</apex:inputText>
<apex:pageBlock title=”Student Records”>
<apex:pageBlockTable id=”tbl” value=”{!selList}” var=”aa”>
<apex:column value=”{!aa.id}”/>
<apex:column value=”{!aa.name}”/>
<apex:column value=”{!aa.Marks__c}”/>
</apex:pageBlockTable>
</apex:pageBlock>
<apex:outputLabel id=”cn“>Congratulations</apex:outputLabel>
We are the ISV Partners and Please reach us for custom development => www.merfantz.com
————————- We hope this will help you —————————