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

render component when onLoad
Hi,
Currenty I have defined some content inside a Visualforce Component.
This Component is seen only when the user clicks a button.
I would like to load this Component when page finish the load or the user clicks on the button.
I thought set a boolean var in the constructor to false (shouldLoadTheComponent)
Set rendered = shouldLoadTheComponent in the component and onLoad, call an actionFunction that would set shouldLoadTheComponent = true and then rerender the component.
What do you think?
Hi,
You can do in this way also like create a function and call that inside the apex:page action component.Like below:
<apex:page action=”{!show}” controller=”Test”>
</apex:page>
Public class Test
{
Public Boolean shouldLoadTheComponent{get;set;}
Public test()
{
shouldLoadTheComponent=false;
}
Public void show()
{
shouldLoadTheComponent=true;
}
}
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.