Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.ui.taglib.display
Class EqualsDecorator

java.lang.Object
  extended by org.hyperic.hq.ui.taglib.display.Decorator
      extended by org.hyperic.hq.ui.taglib.display.ColumnDecorator
          extended by org.hyperic.hq.ui.taglib.display.BaseDecorator
              extended by org.hyperic.hq.ui.taglib.display.EqualsDecorator
All Implemented Interfaces:
java.lang.Cloneable, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class EqualsDecorator
extends BaseDecorator
implements java.lang.Cloneable

Lookup in the context messages for common boolean items for textual display or HTML tag building i.e. "Yes" - "No" "On" - "Off" "/image/icon_on.gif" - "/image/icon_off.gif" You can compare a property to the value and return a Boolean, you can do In the properties file have these keys present: resource.application.inventory.service.id.true=ID is 10001 resource.application.inventory.service.id.false=ID is not 10001


Field Summary
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
EqualsDecorator()
           
 
Method Summary
 java.lang.String decorate(java.lang.Object columnValue)
          The main method to override here.
 int doStartTag()
           
 void release()
           
 void setFlagKey(java.lang.String theFlagKey)
          Sets the message prefix that respresents a boolean result
 void setValue(java.lang.String theValue)
           
 
Methods inherited from class org.hyperic.hq.ui.taglib.display.BaseDecorator
doEndTag, generateErrorComment, getName, getParent, setName, setParent
 
Methods inherited from class org.hyperic.hq.ui.taglib.display.Decorator
finish, finishRow, getList, getListIndex, getObject, getPageContext, getViewIndex, init, initRow, setPageContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
setPageContext
 

Constructor Detail

EqualsDecorator

public EqualsDecorator()
Method Detail

setFlagKey

public void setFlagKey(java.lang.String theFlagKey)
Sets the message prefix that respresents a boolean result

Parameters:
theFlagKey - a String that will have "true" or "false" appended to it to look up in the application properties

setValue

public void setValue(java.lang.String theValue)

decorate

public java.lang.String decorate(java.lang.Object columnValue)
Description copied from class: BaseDecorator
The main method to override here. This should look something like this: String name = null; try { name = (String) evalAttr("name", this.name, String.class); } catch (NullAttributeException ne) { log.debug("bean " + this.name + " not found"); return ""; } catch (JspException je) { log.debug("can't evaluate name [" + this.name + "]: ", je); return ""; } StringBuffer buf = new StringBuffer(1024); buf.append(""); buf.append(obj.toString()); buf.append(""); return buf.toString()

Specified by:
decorate in class BaseDecorator

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class BaseDecorator
Throws:
javax.servlet.jsp.JspTagException

release

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

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.