Class DynamicActionAttributeSupport

All Implemented Interfaces:
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.
  • 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
      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.