public class Param extends Component
This tag can be used to parameterize other tags.
The include tag and bean tag are examples of such tags. The parameters can be added with or without a name as key. If the tag provides a name attribute the parameters are added using theaddParamter
method.
For unnamed parameters the Tag must implement the Param.UnnamedParametric
interface defined in
this class (e.g. The TextTag does this).
This tag has the following two paramters.
<ui:component> <ui:param name="key" value="[0]"/> <ui:param name="value" value="[1]"/> <ui:param name="context" value="[2]"/> </ui:component>where the key will be the identifier and the value the result of an OGNL expression run against the current ValueStack. This second example demonstrates how the text tag can use parameters from this param tag.
<s:text name="cart.total.cost"> <s:param value="#session.cartTotal"/> </s:text>
Modifier and Type | Class and Description |
---|---|
static interface |
Param.UnnamedParametric
Tags can implement this to support nested param tags without the name attribute.
|
Modifier and Type | Field and Description |
---|---|
protected String |
name |
protected String |
value |
actionMapper, COMPONENT_STACK, parameters, stack, throwExceptionOnELFailure
Constructor and Description |
---|
Param(ValueStack stack) |
Modifier and Type | Method and Description |
---|---|
boolean |
end(Writer writer,
String body)
Callback for the end tag of this component.
|
void |
setName(String name) |
void |
setValue(String value) |
boolean |
usesBody()
Overwrite to set if body should be used.
|
addAllParameters, addParameter, altSyntax, completeExpressionIfAltSyntax, copyParams, determineActionURL, determineNamespace, end, fieldError, findAncestor, findString, findString, findStringIfAltSyntax, findValue, findValue, findValue, getComponentStack, getParameters, getStack, popComponentStack, setActionMapper, setThrowExceptionsOnELFailure, setUrlHelper, start, stripExpressionIfAltSyntax, toString
public Param(ValueStack stack)
public boolean end(Writer writer, String body)
Component
public boolean usesBody()
Component
public void setName(String name)
public void setValue(String value)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.