| java.lang.Object org.zkoss.web.servlet.dsp.action.AbstractAction
All known Subclasses: org.zkoss.web.servlet.dsp.action.Remove, org.zkoss.web.servlet.dsp.action.html.Img, org.zkoss.web.servlet.dsp.action.html.Box, org.zkoss.web.servlet.dsp.action.Set, org.zkoss.web.servlet.dsp.action.ForEach, org.zkoss.web.servlet.dsp.action.When, org.zkoss.web.servlet.dsp.action.If, org.zkoss.web.servlet.dsp.action.Otherwise, org.zkoss.web.servlet.dsp.action.Page, org.zkoss.web.servlet.dsp.action.Include, org.zkoss.web.servlet.dsp.action.Out, org.zkoss.web.servlet.dsp.action.Choose,
AbstractAction | abstract public class AbstractAction implements Action(Code) | | A skeletal implementation to simplify the implementation of actions.
author: tomyeh |
Field Summary | |
final protected static int | NULL_INT A special integer to denote no attribute is assigned. | final protected static short | NULL_SHORT A special short to denote no attribute is assigned. |
Method Summary | |
final protected static void | append(StringBuffer sb, String attrName, String attrValue) Appends an attribute to the string buffer,
if attrValue is not null. | protected static void | append(StringBuffer sb, String attrName, boolean avail) Appends an attribute to the string buffer,
if avail is true. | final protected static void | append(StringBuffer sb, String attrName, int val) Appends an attribute to the string buffer,
if val is not NULL_INT. | public boolean | getIf() Returns the if condition. | public boolean | getUnless() Returns the unless condition. | public boolean | isEffective() Returns whether this tag is effecive. | final protected static void | put(Map params, String attrName, String attrValue) Puts an attribute to the map,
if attrValue is not null. | final protected static void | put(Map params, String attrName, boolean avail) Puts an attribute to the map. | final protected static void | put(Map params, String attrName, int val) Puts an attribute to the map,
if val is not NULL_INT. | final protected static void | put(Map params, String attrName, Object attrValue) Puts an object if it is not null. | public void | setIf(boolean ifcond) Sets the if condition. | public void | setUnless(boolean unless) Sets the unless condition. | final protected static int | toScope(String scope) Returns one of
ActionContext.PAGE_SCOPE ,
ActionContext.REQUEST_SCOPE ,
ActionContext.SESSION_SCOPE and
ActionContext.APPLICATION_SCOPE of the specified scope name. |
NULL_INT | final protected static int NULL_INT(Code) | | A special integer to denote no attribute is assigned.
|
NULL_SHORT | final protected static short NULL_SHORT(Code) | | A special short to denote no attribute is assigned.
|
append | final protected static void append(StringBuffer sb, String attrName, String attrValue)(Code) | | Appends an attribute to the string buffer,
if attrValue is not null.
|
append | protected static void append(StringBuffer sb, String attrName, boolean avail)(Code) | | Appends an attribute to the string buffer,
if avail is true.
|
append | final protected static void append(StringBuffer sb, String attrName, int val)(Code) | | Appends an attribute to the string buffer,
if val is not NULL_INT.
|
getIf | public boolean getIf()(Code) | | Returns the if condition.
If the if condition is false, this tag is ignored.
If the unless condition (
AbstractAction.getUnless ) is true, this tag is
ignored, too.
Tags deriving from this class shall invoke
AbstractAction.isEffective to
know the result.
Default: true.
|
getUnless | public boolean getUnless()(Code) | | Returns the unless condition.
If the unless condition is true, this tag is ignored.
If the if condition (
AbstractAction.getIf ) is true, this tag is ignored, too.
Tags deriving from this class shall invoke
AbstractAction.isEffective to
know the result.
Default: false.
|
isEffective | public boolean isEffective()(Code) | | Returns whether this tag is effecive. If false, this tag does nothing
(as if not specified at all).
|
put | final protected static void put(Map params, String attrName, String attrValue)(Code) | | Puts an attribute to the map,
if attrValue is not null.
|
put | final protected static void put(Map params, String attrName, boolean avail)(Code) | | Puts an attribute to the map.
Unlike othere put(...), it always puts the specified attribute.
|
put | final protected static void put(Map params, String attrName, int val)(Code) | | Puts an attribute to the map,
if val is not NULL_INT.
|
put | final protected static void put(Map params, String attrName, Object attrValue)(Code) | | Puts an object if it is not null.
|
setIf | public void setIf(boolean ifcond)(Code) | | Sets the if condition.
|
setUnless | public void setUnless(boolean unless)(Code) | | Sets the unless condition.
|
|
|