|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.tagext.BodyTagSupport
org.opensubsystems.core.www.PageElementCacheTag
org.opensubsystems.core.www.BlockElementTag
public class BlockElementTag
Custom tag to generate all HTML code necessary to display block element (DIV or SPAN), for which we can set id and style and the ID is remembered so that child containers can access it and use it to generate compound IDs.
| Field Summary | |
|---|---|
static java.lang.String |
CURRENT_ELEMENT_ID
Name of the attribute representing stack storing ID of the current element. |
static java.lang.String |
DIV_BLOCK_ELEMENT
DIV block element. |
protected java.lang.String |
m_strCssclass
Class for the the whole element. |
protected java.lang.String |
m_strIdSuffix
Suffix to append to id when generating HTML. |
protected java.lang.String |
m_strRelatedIds
Flag signaling if the id of this element is related to the id of the parent element. |
protected java.lang.String |
m_strStyle
Additional CSS style for the the whole element. |
protected java.lang.String |
m_strType
Type of the block element. |
static java.lang.String |
SPAN_BLOCK_ELEMENT
SPAN block element. |
| Fields inherited from class org.opensubsystems.core.www.PageElementCacheTag |
|---|
CACHE_INDICATOR, CSS_ELEMENT, JS_ELEMENT, m_strCacheas, m_strId, PAGE_ELEMENTS_CACHE, SCRIPT_ELEMENT |
| Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
|---|
bodyContent |
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
id, pageContext |
| Fields inherited from interface javax.servlet.jsp.tagext.BodyTag |
|---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
| Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
|---|
EVAL_BODY_AGAIN |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
| Constructor Summary | |
|---|---|
BlockElementTag(java.lang.String strCssclass,
java.lang.String strType)
Constructor for custom tag. |
|
| Method Summary | |
|---|---|
protected void |
adjustId()
Checks if the ids of this and parent tags are related and if they are, change the id of this tag to be concatenation with the parent id. |
int |
doEndTag()
|
int |
doStartTag()
|
java.lang.String |
getCssclass()
|
protected java.lang.String |
getCurrentId()
Restore to the current id to be used by nested elements. |
java.lang.String |
getRelatedids()
|
java.lang.String |
getStyle()
|
java.lang.String |
getType()
|
boolean |
isRelatedIdsTag()
|
protected void |
popCurrentId()
Restore to the current id to be used by nested elements. |
protected void |
pushCurrentId()
Store to the current id to be used by nested elements. |
protected void |
restoreId()
Restore the changed (if any) made by adjustId method. |
void |
setCssclass(java.lang.String strCssclass)
|
void |
setRelatedids(boolean bRelatedIds)
|
void |
setRelatedids(java.lang.String strRelatedIds)
|
protected void |
setStoredId(boolean bIdStored)
Set up flag for stored ID |
void |
setStyle(java.lang.String style)
|
void |
setType(java.lang.String strType)
|
| Methods inherited from class org.opensubsystems.core.www.PageElementCacheTag |
|---|
cache, getCacheas, getCachedContent, getCachedContent, getCachedContent, getCachedContentElements, getId, setCacheas, setId |
| Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
|---|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue |
| 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 |
|---|
getParent, setPageContext, setParent |
| Field Detail |
|---|
public static final java.lang.String CURRENT_ELEMENT_ID
public static final java.lang.String DIV_BLOCK_ELEMENT
public static final java.lang.String SPAN_BLOCK_ELEMENT
protected java.lang.String m_strCssclass
protected java.lang.String m_strStyle
protected java.lang.String m_strType
protected java.lang.String m_strIdSuffix
protected java.lang.String m_strRelatedIds
| Constructor Detail |
|---|
public BlockElementTag(java.lang.String strCssclass,
java.lang.String strType)
strCssclass - - initial class of the elementstrType - - type of tag - DIV or SPAN| Method Detail |
|---|
public int doStartTag()
throws javax.servlet.jsp.JspException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class PageElementCacheTagjavax.servlet.jsp.JspException
public int doEndTag()
throws javax.servlet.jsp.JspException
doEndTag in interface javax.servlet.jsp.tagext.TagdoEndTag in class PageElementCacheTagjavax.servlet.jsp.JspExceptionpublic java.lang.String getCssclass()
public java.lang.String getType()
public java.lang.String getStyle()
public void setCssclass(java.lang.String strCssclass)
strCssclass - - Class for the the whole elementpublic void setType(java.lang.String strType)
strType - - type of the block elementpublic void setStyle(java.lang.String style)
style - - Additional CSS style for the the whole element.public java.lang.String getRelatedids()
public void setRelatedids(java.lang.String strRelatedIds)
strRelatedIds - - If id of this and parent tag should be related then
this attribute should say true or 1.public void setRelatedids(boolean bRelatedIds)
bRelatedIds - - If id of this and parent tag should be related then
this attribute should say true or 1.public boolean isRelatedIdsTag()
protected void pushCurrentId()
protected void popCurrentId()
throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException - - id was stored but cannot be found anymoreprotected java.lang.String getCurrentId()
protected void setStoredId(boolean bIdStored)
bIdStored - - flag signaling if id is stored or notprotected void adjustId()
protected void restoreId()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||