You need to sign in to do that
Don't have an account?
Kamakshi Sharma
why we use two outputPanel one for giving id and second for rendered, like this one in the below example, what will happen if I use id and rendered in same outputPanel, I know there will be some problem if we'll use id and rendered in same outputPanel
<apex:outputPanel id="accdetails">
<apex:outputPanel rendered="{!selectAcc.id !=Null}">
<table><tr>
<td>Name : {!selectAcc.Name}</td>
<td>Id : {!selectAcc.Id}</td>
</tr>
<tr>
<td>Owner : {!selectAcc.Ownerid}</td>
<td>Rating : {!selectAcc.Rating}</td>
</tr>
</table>
</apex:outputPanel>
</apex:outputPanel>
<apex:outputPanel rendered="{!selectAcc.id !=Null}">
<table><tr>
<td>Name : {!selectAcc.Name}</td>
<td>Id : {!selectAcc.Id}</td>
</tr>
<tr>
<td>Owner : {!selectAcc.Ownerid}</td>
<td>Rating : {!selectAcc.Rating}</td>
</tr>
</table>
</apex:outputPanel>
</apex:outputPanel>
For example below.
1. Account apart from "Govt" industry can only be displayed
2. If Account haveing rating , then first panel will show up
3. If Account source is FB then 2nd panel will show up.
Imagine this kind of a task. here u need a parent panel and 2 sub panel and there will be no issue using id along with rendered either in parent panel or sub panel.