corelib.services.web.bindings
Class BindingExpression

java.lang.Object
  extended by corelib.services.web.bindings.BindingExpression

public class BindingExpression
extends java.lang.Object

A binding expression compute the value of a Java Bean expression. A Java Bean contains, in particular, properties (a pair of methods also named accessors - getter and setter). In this framework you use bean properties, but you don't prefix the property name with get or set : the framework automatically computes the method name, according to the accessing mode (read/write).

example

Expressions Equivalent Java code complementary explanations
this.currentArticle.brand this.getCurrentArticle().getBrand() this is the webPage
counter this.session.getAttribute("counter") this is the webPage and counter is store in the http session (or application).
article.unitaryPrice this.session.getAttribute("article").getUnitaryPrice() this is the webPage and article is a bean stored in the http session (or the application).

The root bean can be this (the web page) or a session object or a application object. The root bean can be also, associated to a web resource file.

Since:
0.1.0
Author:
Infini Software : Alexia Ramaioli & Dominique Liard

Field Summary
static java.lang.String BINDING_REGULAR_EXPRESSION
           
 
Method Summary
 void doDataExchange(BindingExpressionDirection direction)
          Do data exchange between the web component property and it's associated JavaBeans instance.
static BindingExpression getNewInstance(java.lang.Object webComponent, java.lang.String webPropertyName, java.lang.String expression, TemplatedComponent templatedComponent)
          Produces a new BindingExpression instance.
 TemplatedComponent getTemplatedComponent()
          Returns the templated component that is associated with binding expression.
 WebComponent getWebComponent()
          Returns the web component that define this binding expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BINDING_REGULAR_EXPRESSION

public static final java.lang.String BINDING_REGULAR_EXPRESSION
See Also:
Constant Field Values
Method Detail

getNewInstance

public static BindingExpression getNewInstance(java.lang.Object webComponent,
                                               java.lang.String webPropertyName,
                                               java.lang.String expression,
                                               TemplatedComponent templatedComponent)
Produces a new BindingExpression instance.

Parameters:
webComponent - Identify the web component associated to this binding expression.
webPropertyName - Identify the property, of the web component, associated to this binding expression.
expression - The string representation of the binding expresionn.
templatedComponent - The templatedComponent if expression to eveluate are into.
Returns:
A BindingExpression instance that can evalute the string representation.

getWebComponent

public WebComponent getWebComponent()
Returns the web component that define this binding expression.

Returns:
The associtated web component.

doDataExchange

public void doDataExchange(BindingExpressionDirection direction)
Do data exchange between the web component property and it's associated JavaBeans instance. The exchange depends of the direction passed as parameter.

Parameters:
direction - Two directions are supported : BindingExpressionDirection.OBJECT_TO_WEB_COMPONENT and BindingExpressionDirection.WEB_COMPONENT_TO_OBJECT

getTemplatedComponent

public TemplatedComponent getTemplatedComponent()
Returns the templated component that is associated with binding expression.

Returns:
The eventual templatedCompnent associate with BindingExpression, can be null.


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.