Class DefaultMethodValueTag

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.deltava.taglib.content.DefaultMethodValueTag
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag
Direct Known Subclasses:
DefaultMethodTag, EnumDescriptionTag

public class DefaultMethodValueTag extends TagSupport
A JSP tag to call default interface methods since EL is stupid.
Since:
10.0
Version:
11.2
Author:
Luke
See Also:
  • Constructor Details

    • DefaultMethodValueTag

      public DefaultMethodValueTag()
  • Method Details

    • setVar

      public void setVar(String vName)
      Sets the request attribute name.
      Parameters:
      vName - the name of the request attribute to store the data in
    • setObject

      public void setObject(Object o)
      Sets the object to execute against.
      Parameters:
      o - the Object
    • setMethod

      public void setMethod(String methodName)
      Sets the method name to find and call.
      Parameters:
      methodName - the method name, minus get or set
    • hasObject

      protected boolean hasObject()
      Returns whether the object to executae against is present.
      Returns:
      TRUE if not null, otherwise FALSE
    • getValue

      protected Object getValue() throws Exception
      Retrieves the method's return value via reflection.
      Returns:
      an Object
      Throws:
      Exception - if an error occurs
    • doStartTag

      public int doStartTag() throws JspException
      Specified by:
      doStartTag in interface Tag
      Overrides:
      doStartTag in class TagSupport
      Throws:
      JspException