|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shale.util.Tags
public class Tags
A utility class for JSF tags. An instance of this class is
specified as an application-scoped managed bean in
faces-config.xml, under the name
org.apache.shale.TAG_UTILITY_BEAN.
The org.apache.shale.taglib.CommonsValidatorTag
uses that managed bean.
Nearly all of the methods of this class set a component attribute or
create a value- or method-binding, given a String representation
of the value. The methods check to see whether the value is a value
reference (ie. #{...}); if so, the methods set value
bindings or method bindings, as appropriate, for the component.
| Constructor Summary | |
|---|---|
Tags()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
eval(java.lang.String expression)
Evaluate the expression. |
java.lang.Boolean |
evalBoolean(java.lang.String expression)
Evaluate the expression and return a Boolean. |
java.lang.Double |
evalDouble(java.lang.String expression)
Evaluate the expression and return a Double. |
java.lang.Integer |
evalInteger(java.lang.String expression)
Evaluate the expression and return an Integer. |
java.lang.String |
evalString(java.lang.String expression)
Evaluate the expression. |
void |
setAction(javax.faces.component.UIComponent component,
java.lang.String attributeValue)
Sets the component's Action
by setting a method binding with the given attribute
value. |
void |
setActionListener(javax.faces.component.UIComponent component,
java.lang.String attributeValue)
Sets the component's ActionListener
by setting a method binding with the given attribute
value. |
void |
setBoolean(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets the component's attributeName with the
given attributeValue as a Boolean. |
void |
setDouble(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets the component's attributeName with the
given attributeValue as a Double. |
void |
setInteger(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets the component's attributeName with the
given attributeValue as a Integer. |
void |
setMethodBinding(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue,
java.lang.Class[] paramTypes)
Sets the component's attributeName with the
given attributeValue as a MethodBinding. |
void |
setString(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets the component's attributeName with the
given attributeValue as a String. |
void |
setValidator(javax.faces.component.UIComponent component,
java.lang.String attributeValue)
Sets the component's Validator
by setting a method binding with the given attribute
value. |
void |
setValueBinding(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets the component's attributeName with the
given attributeValue as a ValueBinding. |
void |
setValueChangeListener(javax.faces.component.UIComponent component,
java.lang.String attributeValue)
Sets the component's ValueChangeListener
by setting a method binding with the given attribute
value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Tags()
| Method Detail |
|---|
public void setString(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets the component's attributeName with the
given attributeValue as a String.
If the attributeValue is null, do
nothing. If attributeValue is a value reference,
set a value binding for the component. Otherwise, store the
attributeValue in the component's attribute map.
component - The JSF componentattributeName - The name of the attribute to setattributeValue - The value of the attribute
public void setInteger(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets the component's attributeName with the
given attributeValue as a Integer.
If the attributeValue is null, do
nothing. If attributeValue is a value reference,
set a value binding for the component. Otherwise, store the
attributeValue in the component's attribute map.
component - The JSF componentattributeName - The name of the attribute to setattributeValue - The value of the attribute
public void setDouble(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets the component's attributeName with the
given attributeValue as a Double.
If the attributeValue is null, do
nothing. If attributeValue is a value reference,
set a value binding for the component. Otherwise, store the
attributeValue in the component's attribute map.
component - The JSF componentattributeName - The name of the attribute to setattributeValue - The value of the attribute
public void setBoolean(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets the component's attributeName with the
given attributeValue as a Boolean.
If the attributeValue is null, do
nothing. If attributeValue is a value reference,
set a value binding for the component. Otherwise, store the
attributeValue in the component's attribute map.
component - The JSF componentattributeName - The name of the attribute to setattributeValue - The value of the attribute
public void setValueBinding(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue)
Sets the component's attributeName with the
given attributeValue as a ValueBinding.
If the attributeValue is null, do
nothing. If attributeValue is a value reference,
set a value binding for the component. Otherwise, store the
attributeValue in the component's attribute map.
component - The JSF componentattributeName - The name of the attribute to setattributeValue - The value of the attribute
public void setActionListener(javax.faces.component.UIComponent component,
java.lang.String attributeValue)
Sets the component's ActionListener
by setting a method binding with the given attribute
value.
component - The JSF componentattributeValue - The value of the attribute
public void setValueChangeListener(javax.faces.component.UIComponent component,
java.lang.String attributeValue)
Sets the component's ValueChangeListener
by setting a method binding with the given attribute
value.
component - The JSF componentattributeValue - The value of the attribute
public void setValidator(javax.faces.component.UIComponent component,
java.lang.String attributeValue)
Sets the component's Validator
by setting a method binding with the given attribute
value.
component - The JSF componentattributeValue - The value of the attribute
public void setAction(javax.faces.component.UIComponent component,
java.lang.String attributeValue)
Sets the component's Action
by setting a method binding with the given attribute
value.
component - The JSF componentattributeValue - The value of the attribute
public void setMethodBinding(javax.faces.component.UIComponent component,
java.lang.String attributeName,
java.lang.String attributeValue,
java.lang.Class[] paramTypes)
Sets the component's attributeName with the
given attributeValue as a MethodBinding.
If the attributeValue is null, do
nothing. If attributeValue is a value reference,
set a value binding for the component. Otherwise, store the
attributeValue in the component's attribute map.
component - The JSF componentattributeName - The name of the attribute to setattributeValue - The value of the attributeparamTypes - Signature for method parameterspublic java.lang.Object eval(java.lang.String expression)
Evaluate the expression. If it's a value reference,
get the reference's value.
Otherwise, return the expression.
expression - The expressionpublic java.lang.String evalString(java.lang.String expression)
Evaluate the expression. If it's a value reference,
get the reference's value as a String.
Otherwise, return the expression.
expression - The expressionpublic java.lang.Integer evalInteger(java.lang.String expression)
Evaluate the expression and return an Integer.
expression - The expressionpublic java.lang.Double evalDouble(java.lang.String expression)
Evaluate the expression and return a Double.
expression - The expressionpublic java.lang.Boolean evalBoolean(java.lang.String expression)
Evaluate the expression and return a Boolean.
expression - The expression
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||