Dec 23, 2011 12:07 AM
38 Posts
topic has been resolvedResolved

loaded vs rendered

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: xpages
  • Replies: 1
 I find a property "loaded" and "rendered" inside almost all the controls in XPages.
What is the main difference between them and what is the appropriate place to use them?
Dec 23, 2011 6:09 AM
272 Posts
Re: loaded vs rendered
the main difference between these two options is that if a XPage is loaded and a control has loaded property set to false, the control is not created in the JSF tree. If rendered is set to false, the control is not visible in the tree (but will be created).
For example you can access a not rendered control during during a refresh of the XPage and set rendered to true. In contrast a not loaded control is not available and cannot be accessed programmatically.
This also means that all code in a not rendered control will be internally executed: If you define a datasource in a custom control and set rendered to false, the datasource will still get computed (this can throw up interesting effects...).
Hope this helps