Class DynamicActionAttributeSupport
java.lang.Object
net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport
- All Implemented Interfaces:
DynamicActionAttributes
- Direct Known Subclasses:
ButtonBean
,FieldInfo
,LoginFormBean
,MenuItemBean
,TabBean
public abstract class DynamicActionAttributeSupport
extends Object
implements DynamicActionAttributes
Abstract base class intended to be extended by
Action
implementations
that want to support dynamic action attributes. Typically, if the action factory
descends from AbstractJspFactory
.- Since:
- 3.3
- Author:
- nicklas
-
Field Summary
Modifier and TypeFieldDescriptionprivate Iterator<DynamicActionAttribute>
private Map<String,
DynamicActionAttribute> private DynamicActionAttributes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Append all dynamic action attributes to the string builder.static String
getAttributesString
(Object action) If the object implements DynamicActionAttributes interface, get a string with all dynamic attributes, otherwise an empty string.Get an iterator that return all dynamic attributes.void
Set the source of dynamic action attributes.void
setDynamicAttribute
(String name, Object value) Adds a dynamic attribute to the action.
-
Field Details
-
dynamicAttributes
-
source
-
moreAttributes
-
-
Constructor Details
-
DynamicActionAttributeSupport
protected DynamicActionAttributeSupport()
-
-
Method Details
-
getAttributesString
If the object implements DynamicActionAttributes interface, get a string with all dynamic attributes, otherwise an empty string. -
addAttributes
Append all dynamic action attributes to the string builder. -
getDynamicActionAttributes
Description copied from interface:DynamicActionAttributes
Get an iterator that return all dynamic attributes. If no dynamic attributes have been defined, the method may return null or an iterator that doesn't return any elements.- Specified by:
getDynamicActionAttributes
in interfaceDynamicActionAttributes
- Returns:
- An iterator or null
-
setDynamicActionAttributesSource
Set the source of dynamic action attributes. The source is another instance of an object that implements theDynamicActionAttributes
interface. -
setDynamicAttribute
Adds a dynamic attribute to the action. The name should be unique or it will overwrite any existing attribute. Attributes that are set via this method are merged with attributes that are set viasetDynamicActionAttributesSource(DynamicActionAttributes)
. Duplicates are not removed in this case.- Since:
- 3.16
-