|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.zkoss.web.servlet.dsp.action.AbstractAction
public abstract class AbstractAction
A skeletal implementation to simplify the implementation of actions.
Field Summary | |
---|---|
protected static int |
NULL_INT
A special integer to denote no attribute is assigned. |
protected static short |
NULL_SHORT
A special short to denote no attribute is assigned. |
Constructor Summary | |
---|---|
AbstractAction()
|
Method Summary | |
---|---|
protected static void |
append(java.lang.StringBuffer sb,
java.lang.String attrName,
boolean avail)
Appends an attribute to the string buffer, if avail is true. |
protected static void |
append(java.lang.StringBuffer sb,
java.lang.String attrName,
int val)
Appends an attribute to the string buffer, if val is not NULL_INT. |
protected static void |
append(java.lang.StringBuffer sb,
java.lang.String attrName,
java.lang.String attrValue)
Appends an attribute to the string buffer, if attrValue is not null. |
boolean |
getIf()
Returns the if condition. |
boolean |
getUnless()
Returns the unless condition. |
boolean |
isEffective()
Returns whether this tag is effecive. |
protected static void |
put(java.util.Map params,
java.lang.String attrName,
boolean avail)
Puts an attribute to the map. |
protected static void |
put(java.util.Map params,
java.lang.String attrName,
int val)
Puts an attribute to the map, if val is not NULL_INT. |
protected static void |
put(java.util.Map params,
java.lang.String attrName,
java.lang.Object attrValue)
Puts an object if it is not null. |
protected static void |
put(java.util.Map params,
java.lang.String attrName,
java.lang.String attrValue)
Puts an attribute to the map, if attrValue is not null. |
void |
setIf(boolean ifcond)
Sets the if condition. |
void |
setUnless(boolean unless)
Sets the unless condition. |
protected static int |
toScope(java.lang.String scope)
Returns one of ActionContext.PAGE_SCOPE , ActionContext.REQUEST_SCOPE ,
ActionContext.SESSION_SCOPE and ActionContext.APPLICATION_SCOPE
of the specified scope name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.zkoss.web.servlet.dsp.action.Action |
---|
render |
Field Detail |
---|
protected static final int NULL_INT
protected static final short NULL_SHORT
Constructor Detail |
---|
public AbstractAction()
Method Detail |
---|
public boolean getIf()
getUnless()
) is true, this tag is
ignored, too.
Tags deriving from this class shall invoke isEffective()
to
know the result.
Default: true.
public void setIf(boolean ifcond)
public boolean getUnless()
getIf()
) is true, this tag is ignored, too.
Tags deriving from this class shall invoke isEffective()
to
know the result.
Default: false.
public void setUnless(boolean unless)
public boolean isEffective()
protected static final int toScope(java.lang.String scope)
ActionContext.PAGE_SCOPE
, ActionContext.REQUEST_SCOPE
,
ActionContext.SESSION_SCOPE
and ActionContext.APPLICATION_SCOPE
of the specified scope name.
scope
- one of "page", "request", "session" and "application".protected static final void put(java.util.Map params, java.lang.String attrName, java.lang.String attrValue)
attrValue
is not null.
protected static final void put(java.util.Map params, java.lang.String attrName, boolean avail)
protected static final void put(java.util.Map params, java.lang.String attrName, int val)
val
is not NULL_INT.
protected static final void put(java.util.Map params, java.lang.String attrName, java.lang.Object attrValue)
protected static final void append(java.lang.StringBuffer sb, java.lang.String attrName, java.lang.String attrValue)
attrValue
is not null.
protected static void append(java.lang.StringBuffer sb, java.lang.String attrName, boolean avail)
avail
is true.
protected static final void append(java.lang.StringBuffer sb, java.lang.String attrName, int val)
val
is not NULL_INT.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |