Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.tags
Class JivePropertyTag

java.lang.Object
  extended by com.jivesoftware.forum.tags.JivePropertyTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class JivePropertyTag
extends java.lang.Object
implements javax.servlet.jsp.tagext.Tag

A JSP tag to retrieve property values from the database. The tag will return the value or an empty String if the property doesn't exist.

Usage:

Or: Attributes: The assumedTrue attribute can be used if the property might not exist but by default should be a true value. For example, in the following example the tag body will be evaluated even though the "foo.bar" property does not exist in the config file: However, the following tag body will be skipped:

See Also:
JiveGlobals.getJiveProperty(String)

Field Summary
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
JivePropertyTag()
           
 
Method Summary
 int doEndTag()
          Looks up the specified Jive property and writes it out.
 int doStartTag()
          Evalutes the if, name and assumedTrue attributes.
 java.lang.String getAssumeTrue()
          Returns the value of the assumeTrue attribute.
 java.lang.String getIf()
          Returns the String we're testing for the value "true"
 java.lang.String getName()
          Returns name of the Jive property to look up.
 javax.servlet.jsp.tagext.Tag getParent()
           
 void release()
           
 void setAssumeTrue(java.lang.String assumeTrue)
          Sets the assumeTrue attribute.
 void setIf(java.lang.String ifAttribute)
          Sets the String we're getting for the value "true"
 void setName(java.lang.String name)
          Sets the name of the Jive property to look up.
 void setPageContext(javax.servlet.jsp.PageContext pageContext)
           
 void setParent(javax.servlet.jsp.tagext.Tag parentTag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JivePropertyTag

public JivePropertyTag()
Method Detail

getName

public java.lang.String getName()
Returns name of the Jive property to look up. See class description for complete tag attribute description.

Returns:
the name of the Jive property to look up.

setName

public void setName(java.lang.String name)
Sets the name of the Jive property to look up. See the class description for complete tag attribute description.

Parameters:
name - the name of the Jive property to look up.

getIf

public java.lang.String getIf()
Returns the String we're testing for the value "true"

Returns:
the String we're testing for the value "true"

setIf

public void setIf(java.lang.String ifAttribute)
Sets the String we're getting for the value "true"

Parameters:
ifAttribute - the String we're testing for the value "true"

getAssumeTrue

public java.lang.String getAssumeTrue()
Returns the value of the assumeTrue attribute.

Returns:
the value of the assumeTrue attribute.

setAssumeTrue

public void setAssumeTrue(java.lang.String assumeTrue)
Sets the assumeTrue attribute. Recognized values are "true" and "yes".

Parameters:
assumeTrue - the value of the assumeTrue attribute.

setPageContext

public void setPageContext(javax.servlet.jsp.PageContext pageContext)
Specified by:
setPageContext in interface javax.servlet.jsp.tagext.Tag

getParent

public javax.servlet.jsp.tagext.Tag getParent()
Specified by:
getParent in interface javax.servlet.jsp.tagext.Tag

setParent

public void setParent(javax.servlet.jsp.tagext.Tag parentTag)
Specified by:
setParent in interface javax.servlet.jsp.tagext.Tag

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Evalutes the if, name and assumedTrue attributes.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Returns:
EVAL_BODY_INCLUDE if we should evaluate the tag body, SKIP_BODY otherwise.
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Looks up the specified Jive property and writes it out. If the property was not found, a blank String is written.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Returns:
the specified Jive property value or a blank String if no propery exists.
Throws:
javax.servlet.jsp.JspException

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.