Practical implications of Facelets ui:remove tag
Asked Answered
F

1

4

I want to understand the basic mechanism of <ui:remove>. As per my knowledge, <ui:remove> is basically used in conjunction when basic HTML stuff is part of your Facelets page. When you want, when rendering of the Facelets page happen, it should ignore this part of HTML code, we can use the <ui:remove> tag.

Still I am confused about practical implications of <ui:remove>. How often we need to use this Facelets tag? Additionally, the Facelets page is not compiled everytime when the page is hit.

Firkin answered 26/6, 2013 at 13:8 Comment(0)
L
5

It's useful to remove content which is required during design time, but not during run time, such as comments, some stubbed content (e.g. "lorem ipsum") which aids in filling up the page content to fit the layout in visual designers such as Dreamweaver, etc.

If you're not a page designer, but already retrieve designs as PSD/AI/etc, it's indeed useless to you.

See also:

Lyophilize answered 26/6, 2013 at 13:14 Comment(2)
Thanks BalusC. I understood it. Thanks a ton. I will look into the details of the links you provided as well.Firkin
Would there be an advantage in using remove instead of rendered when the condition won't change during the viewer visit? For example if an user doesn't have an admin role then ui:remove instead of rendered could be beneficial to not have the component in components tree thus making it a tiny bit more performant. I don't use ui:remove so I might be far off lol (render time), this is just an hypothesis.Strobotron

© 2022 - 2024 — McMap. All rights reserved.