• Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the correct syntax when using multimple EL expressions?  RSS feed

 
Dan Acuff
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



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
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!