| Author |
How can I add expression some code in XHTML (under faceletes)?
|
Mark Kafe
Ranch Hand
Joined: Jun 23, 2008
Posts: 60
|
|
How can I add expression some code in XHTML (under faceletes)?
i want to use expression in my xhtmls pages under facelets
With Facelets which builds JSF UI tree in pure xhtml (without scriptlets like JSP : <%=...%>) its true can we not use scriptlets like JSP
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14487
|
|
JSF is an MVC architecture. Thus, the Model, the View, and the Controller are 3 separate entities, each with its own specific purpose. For the most part this means that logic has no place in the View. The exception being mostly simple EL used in "rendered" attributes.
Even where you can use scriptlets in JSF, it's bad design. It's not even very good design in JSP - I've been helping someone out who can make hardly any sense of his project because half the program logic or more is in JSPs polluting the HTML instead of being in Java classes.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Mark Kafe
Ranch Hand
Joined: Jun 23, 2008
Posts: 60
|
|
|
yaaa i know this all.........but we have problems in tab switching thats why we want tu use some scriptlets........
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14487
|
|
|
If you're using the RichFaces tabs, you wouldn't use scriptlets anyway - and I'm not. The RichFaces tabs can be selected server-side via an Action or client-side via JavaScript.
|
 |
 |
|
|
subject: How can I add expression some code in XHTML (under faceletes)?
|
|
|