org.javalid.external.jsf
Class JsfFacadeImpl_11

java.lang.Object
  extended by org.javalid.external.jsf.JsfFacadeImpl_11
All Implemented Interfaces:
JsfFacade

public class JsfFacadeImpl_11
extends java.lang.Object
implements JsfFacade

This implements the JSF version facade, for JSF 1.1 implementations.

Since:
1.0.1
Version:
1.0.
Author:
M.Reuvers

Field Summary
 
Fields inherited from interface org.javalid.external.jsf.JsfFacade
JSF_FACADE_CLASS_11, JSF_FACADE_CLASS_12
 
Constructor Summary
protected JsfFacadeImpl_11()
           
 
Method Summary
 java.lang.String getExpressionStringForComponentProperty(javax.faces.component.UIComponent component, java.lang.String propertyName)
          Returns the expression string from either the ValueBinding/ValueExpression that is resolved from the component using given property.
 java.lang.Object getValueForComponentProperty(javax.faces.context.FacesContext ctx, javax.faces.component.UIComponent component, java.lang.String propertyName)
          Gets the value of a property from a component.
 java.lang.Object getValueForExpression(javax.faces.context.FacesContext ctx, java.lang.String expression)
          For given expression, lookups ValueBinding / ValueExpression and retrieves the value from it.
 void setValueForComponentProperty(javax.faces.context.FacesContext ctx, javax.faces.component.UIComponent component, java.lang.String propertyName, java.lang.Object newValue)
          Sets a new value for given property from a component.
 void setValueForComponentPropertyWithExpression(javax.faces.context.FacesContext ctx, javax.faces.component.UIComponent component, java.lang.String propertyName, java.lang.String expressionValue)
          Sets a new value for given property from a component.
 void setValueForExpression(javax.faces.context.FacesContext ctx, java.lang.String expression, java.lang.Object newValue)
          For given expression, lookups ValueBinding / ValueExpression and sets the newValue on it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsfFacadeImpl_11

protected JsfFacadeImpl_11()
Method Detail

getValueForExpression

public java.lang.Object getValueForExpression(javax.faces.context.FacesContext ctx,
                                              java.lang.String expression)
Description copied from interface: JsfFacade
For given expression, lookups ValueBinding / ValueExpression and retrieves the value from it. If no binding / expression is found (null), so no value can be retrieved from it, a JavalidException is raised. Note that null can be returned, but that would mean we found a ValueBinding / ValueExpression except the value from it was null. If an exception occurs for any other reason a JavalidException is raised.

Specified by:
getValueForExpression in interface JsfFacade
Parameters:
ctx - The current facescontext
expression - The expression to resolve
Returns:
Object from ValueBinding / ValueExpression

setValueForExpression

public void setValueForExpression(javax.faces.context.FacesContext ctx,
                                  java.lang.String expression,
                                  java.lang.Object newValue)
Description copied from interface: JsfFacade
For given expression, lookups ValueBinding / ValueExpression and sets the newValue on it. If no binding/expression is found (null), thus no value can be set on it, a JavalidException is raised. If an exception occurs for any other reason a JavalidException is raised.

Specified by:
setValueForExpression in interface JsfFacade
Parameters:
ctx - The current facescontext
expression - The expression to resolve
newValue - The new value to set on the valuebinding / valueexpression.

getValueForComponentProperty

public java.lang.Object getValueForComponentProperty(javax.faces.context.FacesContext ctx,
                                                     javax.faces.component.UIComponent component,
                                                     java.lang.String propertyName)
Description copied from interface: JsfFacade
Gets the value of a property from a component. For instance on a JSF input component, you can retrieve the value by setting the property to 'value'. Raises JavalidException if an error occurs.

Specified by:
getValueForComponentProperty in interface JsfFacade
Parameters:
ctx - The context
component - The actual component to get it from
propertyName - The property name
Returns:
The actual value

setValueForComponentProperty

public void setValueForComponentProperty(javax.faces.context.FacesContext ctx,
                                         javax.faces.component.UIComponent component,
                                         java.lang.String propertyName,
                                         java.lang.Object newValue)
Description copied from interface: JsfFacade
Sets a new value for given property from a component. For instance on a JSF input component, you can set the value by setting the property to 'value' and give the newValue for it.

Specified by:
setValueForComponentProperty in interface JsfFacade
Parameters:
ctx - The context
component - The actual component to get the property and set the value on
propertyName - Property name
newValue - The new value

setValueForComponentPropertyWithExpression

public void setValueForComponentPropertyWithExpression(javax.faces.context.FacesContext ctx,
                                                       javax.faces.component.UIComponent component,
                                                       java.lang.String propertyName,
                                                       java.lang.String expressionValue)
Description copied from interface: JsfFacade
Sets a new value for given property from a component. For instance on a JSF input component, you can set the value by setting the property to 'value' and give an expression for it, which will be resolved.

Specified by:
setValueForComponentPropertyWithExpression in interface JsfFacade
Parameters:
ctx - The context
component - The actual component to get the property and set the value on
propertyName - Property name
expressionValue - The expression value

getExpressionStringForComponentProperty

public java.lang.String getExpressionStringForComponentProperty(javax.faces.component.UIComponent component,
                                                                java.lang.String propertyName)
Description copied from interface: JsfFacade
Returns the expression string from either the ValueBinding/ValueExpression that is resolved from the component using given property. E.g. <h:inputText value=#{bean.name}"" /> would return #{bean.name} if the property value was asked for.

Specified by:
getExpressionStringForComponentProperty in interface JsfFacade
Parameters:
component - The component
propertyName - The property
Returns:
Expression String