You need to sign in to do that
Don't have an account?

output panel Component
Hi,
Could you please explain me the "output panel " component with simple example.
Regards,
Ram.
Could you please explain me the "output panel " component with simple example.
Regards,
Ram.
In visualforce we often use apex:outputpanel to Conditionally render a section of block of html element using its render attributes .
for eg,
Suppose we have a variable called role in controller and we need to render a block if role is Admin .We can implement it like this
{!role}
<apex:form >
<apex:outputPanel id="AdminPanel" rendered="{!IF(role == "Admin",true,false)">
<apex:outputText value="FirstName:{!name}"/>
</apex:outputPanel>
</apex:form >
As of my understand i have written the simple VF code for the out put panel. here i want to display the text from right to left and from left to right. so i have used the dir tag.when i run the code , i am getting the same out put for both .my code is as follows,
<apex:page controller="hyd4">
<apex:form >
<apex:outputPanel dir="RTL" Layout="BLOCK" >Hi ALL
</apex:outputPanel>
<apex:outputPanel dir="LTR" LAyout="BLOCK" >Hi ALL
</apex:outputPanel>
</apex:form>
</apex:page>
Please suggest me on this.
Regards,
siva
Try this u will understand. No diffrence appered for you is becaues there is no difference in htmll element
<apex:page >
<apex:form >
<apex:outputPanel dir="rtl" >
<div>123</div>
<div>sfdsfsf </div>
</apex:outputPanel>
<apex:outputPanel dir="ltr" >
<div>123</div>
<div>sfdsfsf </div>
</apex:outputPanel>
The difference is in the screen shot
</apex:form>
</apex:page>
Yeahh it is working well now. But when ever weuse the ouput panle we have to use the HTML.....?
and in some codes i have seen that there is no HTML tags while using the output panel....
and wecan use only div and span tags...?
Regards,
Ram.