Forum Controls
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

NetBeans 6: Matisse Updates

NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed.

Introduction to Groovy Part 3

In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.

Easier Custom Components with Swing Fuse

Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.

Benchmark Analysis: Guice vs Spring

Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.
Replies: 2 - Pages: 1  
Threads: [ Previous | Next ]
  Click to reply to this thread Reply

Unified Expression Language in Java Server Faces(JSF)

At 9:55 AM on Jun 24, 2007, krishna wrote:

http://jsf.javabeat.net/articles/2007/06/jsf-unified-expression-language/

1) Introduction

Those of you who have been developing with JavaServer Pages (JSP) technology have probably used its simple expression language to access data from your JSP pages. Since the introduction of this expression language, other Java-based web technologies have been released and have become quite popular with the Java web application developer community.

One of these is the UI component framework, JavaServer Faces technology. To support its powerful features, this framework needed its own expression language (EL). However, this EL presented some problems when used with some JSP tags. Therefore, the specification writers and expert groups of the Java webtier technologies collaborated on a new, unified expression language to help align these technologies by adopting the features offered by the JavaServer Faces expression language. These features include the ability to use expressions to set the value of external object properties as well as get data from them and to invoke methods. At the same time, the webtier team made the language pluggable and extensible so that advanced developers can add custom resolvers able to evaluate expressions not already supported by the expression language.
2) Expression Language Beginnings

The unified expression language started out as the JavaServer Pages Standard Tag Library (JSTL), version 1.0 expression language, originally called SPEL (Simplest Possible Expression Language). True to its name, this expression language is easy-to-use way to access external data objects. For example, the expression ${customer.name} is used to look up the customer JavaBeans component and call the getName method to retrieve the value of the name property. This value is then rendered into the page.

By using this expression language, we can drastically reduce the amount of scripting in our pages, resulting in greater productivity, easier maintenance, and a flatter learning curve in terms of page development.
1 . At 8:08 AM on Jul 16, 2007, Peter Strotmann wrote:
  Click to reply to this thread Reply

Re: Unified Expression Language in Java Server Faces(JSF)

Hallo,

I never succeeded in using a condition in an el-expression, e.g. somthing like

image="${mitglied.gesch == 1 ? "a.jpg" : "p.jpg"}"

Is that possible at all ?

Peter
2 . At 9:13 AM on Jul 24, 2007, Philippe Lhoste wrote:
  Click to reply to this thread Reply

Re: Unified Expression Language in Java Server Faces(JSF)

I just researched this last week. From what I found, I think the answer is "NO"... :(
You can only make elementary comparisons.

thread.rss_message