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 Details

  • Constructor Details

    • DynamicActionAttributeSupport

      protected DynamicActionAttributeSupport()
  • Method Details

    • getAttributesString

      public static String getAttributesString(Object action)
      If the object implements DynamicActionAttributes interface, get a string with all dynamic attributes, otherwise an empty string.
    • addAttributes

      public static void addAttributes(StringBuilder sb, Iterator<DynamicActionAttribute> it)
      Append all dynamic action attributes to the string builder.
    • getDynamicActionAttributes

      public Iterator<DynamicActionAttribute> 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 interface DynamicActionAttributes
      Returns:
      An iterator or null
    • setDynamicActionAttributesSource

      public void setDynamicActionAttributesSource(DynamicActionAttributes source)
      Set the source of dynamic action attributes. The source is another instance of an object that implements the DynamicActionAttributes interface.
    • setDynamicAttribute

      public void setDynamicAttribute(String name, Object value)
      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 via setDynamicActionAttributesSource(DynamicActionAttributes). Duplicates are not removed in this case.
      Since:
      3.16