File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes How can I add expression  some code in XHTML (under faceletes)? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How can I add expression  some code in XHTML (under faceletes)?" Watch "How can I add expression  some code in XHTML (under faceletes)?" New topic
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
    
    7

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
    
    7

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I add expression some code in XHTML (under faceletes)?
 
Similar Threads
Facelets
Does someone know Facelest?
How to use RichFaces in "normal" JSF
is it need to use verbatim to enclosed all non-jsf tag?
Need help in xhtml files