Package com.germinus.easyconf.taglib
Class PropertyTag
java.lang.Object
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 TypeMethodDescriptionint
Save the body content of this tag (if any), or throw a JspException if the value was already defined.int
doEndTag()
Retrieve the required property and expose it as a scripting variable.int
Check if we need to evaluate the body of the taggetId()
private Filter
private String[]
getType()
private Object
void
release()
void
setComponent
(String component) void
setDefaultValue
(String defaultValue) Note: currently this is only used if type is Stringvoid
void
setProperty
(String property) void
setSelector1
(String selector1) void
setSelector2
(String selector2) void
setSelector3
(String selector3) void
setSelector4
(String selector4) void
setSelector5
(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- Throws:
javax.servlet.jsp.JspException
- if a JSP exception has occurredJspException
-
doAfterBody
public int doAfterBody() throws JspExceptionSave the body content of this tag (if any), or throw a JspException if the value was already defined.- Throws:
JspException
- if value was defined by an attribute
-
doEndTag
public int doEndTag() throws JspExceptionRetrieve the required property and expose it as a scripting variable.- Throws:
JspException
- if a JSP exception has occurred
-
readProperty
- Throws:
JspException
-
getPropertyFilter
-
release
public void release()
-