Reputation: 103
Can any one explain me what the main purpose of render and rendered attributes in all JSF, RichFaces component ?
regards
Upvotes: 3
Views: 6577
Reputation: 1793
In java server faces, render is an attribute of a JSF component using which we can load one or more other components on completion of the specific action .
rendered is another property of a JSF components which will have a boolean value, based on which the component will be rendered . If rendered is true then the component will be rendered , otherwise not .
Upvotes: 3
Reputation: 14277
In JSF, components from your Facelets are created on server, forming some kind of component tree. Most of these components should be rendered in HTML in some way, and that is role of Renderer. It will create HTML code which represents that component.
rendered attribute is available on components which can be rendered. It is boolean
attribute and if it is true
(which is as I know always true
by default) that component will be rendered, and its HTML will be sent to clients browser. If it is false
that component will not be rendered in clients browser.
Upvotes: 3