Package com.germinus.easyconf.taglib
Class PropertyTag
BodyTagSupport
com.germinus.easyconf.taglib.PropertyTag
public class PropertyTag
extends BodyTagSupport
Read a configuration property and expose it as a page variable and attribute
Examples of use:
>%@ taglib uri="/WEB-INF/tld/easyconf.tld" prefix="easyconf" %>
>easyconf:property id="registration_list"
component="registration"
property="registration.list"
type="java.util.List"/>
>logic:iterate id="item" name="registration_list">
>bean:write name="item"/> >br/>
>/logic:iterate>
>easyconf:property id="registration_disabled"
component="registration"
property="registration.disabled"/>
>logic:equal name="registration_disabled" value="true">
The registration is disabled
>/logic:equal>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintSave the body content of this tag (if any), or throw a JspException if the value was already defined.intdoEndTag()Retrieve the required property and expose it as a scripting variable.intCheck if we need to evaluate the body of the taggetId()private Filterprivate String[]getType()private Objectvoidrelease()voidsetComponent(String component) voidsetDefaultValue(String defaultValue) Note: currently this is only used if type is StringvoidvoidsetProperty(String property) voidsetSelector1(String selector1) voidsetSelector2(String selector2) voidsetSelector3(String selector3) voidsetSelector4(String selector4) voidsetSelector5(String selector5) void
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
DEFAULT_TYPE
- See Also:
-
id
-
component
-
property
-
type
-
selector1
-
selector2
-
selector3
-
selector4
-
selector5
-
defaultValue
-
EMPTY_LIST
-
-
Constructor Details
-
PropertyTag
public PropertyTag()
-
-
Method Details
-
getId
-
setId
-
getComponent
-
setComponent
-
getProperty
-
setProperty
-
getType
-
setType
-
getDefaultValue
-
setDefaultValue
Note: currently this is only used if type is String- Parameters:
defaultValue-
-
getSelector1
-
setSelector1
-
getSelector2
-
setSelector2
-
getSelector3
-
setSelector3
-
getSelector4
-
setSelector4
-
getSelector5
-
setSelector5
-
getSelectorArray
-
doStartTag
public int doStartTag() throws JspExceptionCheck if we need to evaluate the body of the tag -
doAfterBody
public int doAfterBody() throws JspExceptionSave the body content of this tag (if any), or throw a JspException if the value was already defined. -
doEndTag
public int doEndTag() throws JspExceptionRetrieve the required property and expose it as a scripting variable. -
readProperty
- Throws:
JspException
-
getPropertyFilter
-
release
public void release()
-