Class EventFilterTag
- java.lang.Object
-
- org.apache.commons.jelly.TagSupport
-
- org.apache.commons.jelly.DynaTagSupport
-
- org.apache.commons.jelly.MapTagSupport
-
- org.apache.commons.jelly.tags.core.UseBeanTag
-
- net.sf.jguiraffe.gui.builder.components.tags.UseBeanBaseTag
-
- net.sf.jguiraffe.gui.builder.action.tags.EventFilterTag
-
- All Implemented Interfaces:
ConditionalTag
,PropertySupport
,org.apache.commons.jelly.DynaTag
,org.apache.commons.jelly.impl.BeanSource
,org.apache.commons.jelly.Tag
- Direct Known Subclasses:
ChainedEventFilterTag
public class EventFilterTag extends UseBeanBaseTag
A specialized tag handler class for creating event filters.
With this tag handler class simple (i.e. non chained) event filters can be constructed. By specifying the
class
attribute the concrete class of the filter to be created is defined. Then all the properties supported by this specific filter class can be set in further attributes.The tag also checks if it is nested inside a
ChainedEventFilterTag
tag. If this is the case, the current filter is added as a child filter to this chained filter tag. Otherwise the variableCURRENT_FILTER
is set to the active event filter, which can be queried by other tags.By inheriting from
UseBeanBaseTag
all of the features provided by this base class are available for this tag handler class, too.- Version:
- $Id: EventFilterTag.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Field Summary
Fields Modifier and Type Field Description static String
CURRENT_FILTER
Constant for the current filter variable.-
Fields inherited from class net.sf.jguiraffe.gui.builder.components.tags.UseBeanBaseTag
ATTR_BEAN_CLASS, ATTR_BEAN_NAME, ATTR_CLASS, ATTR_IF_NAME, ATTR_REF, ATTR_UNLESS_NAME, ATTR_VAR
-
-
Constructor Summary
Constructors Constructor Description EventFilterTag()
Creates a new instance ofEventFilterTag
.EventFilterTag(Class<?> defaultClass, Class<?> baseClass)
Creates a new instance ofEventFilterTag
and sets the default class and the base class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
passResults(Object bean)
Performs post processing on the bean.-
Methods inherited from class net.sf.jguiraffe.gui.builder.components.tags.UseBeanBaseTag
addIgnoreProperties, doTag, fetchBean, getAdditionalProperties, getAttributeStr, getBaseClass, getIfName, getUnlessName, isOptional, processBean, setBaseClass, setProperty, useExistingBean
-
Methods inherited from class org.apache.commons.jelly.tags.core.UseBeanTag
addIgnoreProperty, convertToClass, getBean, getDefaultClass, getIgnorePropertySet, isIgnoreUnknownProperties, loadClass, newInstance, setBean, setBeanProperties, setIgnoreUnknownProperties, validateBeanProperties
-
Methods inherited from class org.apache.commons.jelly.MapTagSupport
createAttributes, getAttributes, setAttribute
-
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody
-
-
-
-
Field Detail
-
CURRENT_FILTER
public static final String CURRENT_FILTER
Constant for the current filter variable. This variable will be set to the currently created event filter and can be evaluated by other tags.- See Also:
- Constant Field Values
-
-
Method Detail
-
passResults
protected boolean passResults(Object bean) throws org.apache.commons.jelly.JellyTagException
Performs post processing on the bean. This implementation checks if this tag is nested inside aChainedEventFilter
tag. If this is the case, the filter is added as a child filter. Otherwise the filter is set in the Jelly context as the current filter.- Overrides:
passResults
in classUseBeanBaseTag
- Parameters:
bean
- the new bean- Returns:
- a flag whether the bean could be passed to a target
- Throws:
org.apache.commons.jelly.JellyTagException
- if an error occurs
-
-