This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes What is the correct syntax when using multimple EL expressions? 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 "What is the correct syntax when using multimple EL expressions?" Watch "What is the correct syntax when using multimple EL expressions?" New topic
Author

What is the correct syntax when using multimple EL expressions?

Dan Acuff
Ranch Hand

Joined: Jul 13, 2009
Posts: 62



Not sure how to get the #{customerSession.imageServer} to fire correctly.

In the resulting source code it is actually writing that out as the path.

Can you help me with the syntax for the image attribute?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14480
    
    7

Actually, you'll enjoy life a whole lot more if you don't attempt to put a lot of logic in your EL expressions. In many cases, logic-heavy View definitions are a result of violating the separation of functionality that is at the heart of the Model/View/Controller design paradigm.

Even when it isn't, it can be a royal pain in the fundament to get right. Especially when you have lots of "ands", "ors" and "nots" in it.

From a casual look at the sample element, I would recommend constructing a presentation bean named something like "presentation.orderInfo" and applying all that logic to the orderinfo bean instead of on the view. That would simplify life a lot:


Incidentally, you should be able to tie the image to the style CSS definitions, eliminating the need for a separate image attribute.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the correct syntax when using multimple EL expressions?
 
Similar Threads
Is it okay to use images found on the web?
SEAM s:decorate template attribute?
Replacing a space in each brand name
Question on images and packages
image path goes wrong.