|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectTagSupport
BodyTagSupport
AbstractClassicTag
ScriptContainer
Html
public class Html
Generates the html element and performs error handling within its body.
<netui:html dir="LTR" useLocale="true" />
JavaScript
The <netui:html> tag writes out the following JavaScript functions:
function getNetuiTagName(id) { return netui_names[id]; } function getNetuiTagName(id, tag) { if (scopeId == "") return netui_names[id]; else return netui_names[portletId__id]; } function getIdScope(tag) { if (tag == null) return ""; if (tag.scopeId != null) return tag.scopeId; return getIdScope(tag.parentElement); } results.append("\nfunction getNetuiTagName(id) {\n"); results.append("\treturn "); results.append(NAMES_OBJECT); results.append("[id]; }\n\n"); results.append("\nfunction getNetuiTagName(id, tag) {\n"); results.append("\tvar scopeId = getIdScope(tag);\n"); results.append("\tif (scopeId == \"\")\n"); results.append("\t\treturn "); results.append(NAMES_OBJECT); results.append("[id];\n"); results.append("\telse\n\t\treturn "); results.append(NAMES_OBJECT); results.append("[portletId + \"__\" + id]; }\n\n"); results.append("\nfunction getIdScope(tag) {\n"); results.append("\tif (tag == null) return \"\";\n"); results.append("\tif (tag.scopeId != null) return tag.scopeId;\n"); results.append("\treturn getIdScope(tag.parentElement);\n}\n\n");
Field Summary | |
---|---|
static String |
DOC_TYPE_OVERRIDE
This is an override of the Document type set in the request |
static String |
HTML_401
Constant representing the document type html 4.01 |
static String |
HTML_401_QUIRKS
Constant representing the document type html 4.01 |
static String |
HTML_TAG_ID
The HTML tag is registered into the request with this name. |
static String |
XHTML_10
Constant representing the document type XHTML 1.0 Transitional. |
Fields inherited from class AbstractClassicTag |
---|
DefaultNamingChain, EMPTY_STRING, NETUI_UNIQUE_CNT |
Fields inherited from class BodyTagSupport |
---|
bodyContent |
Fields inherited from class TagSupport |
---|
id, pageContext |
Fields inherited from interface IErrorReporter |
---|
CONTAINER_ERRORS |
Fields inherited from interface BodyTag |
---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface IterationTag |
---|
EVAL_BODY_AGAIN |
Fields inherited from interface Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
Html()
|
Method Summary | |
---|---|
void |
addError(AbstractPageError ape)
Add an error to the errors being reported by this tag. |
protected Locale |
currentLocale()
Return the current Locale for this request, creating a new one if necessary. |
int |
doEndTag()
Write out the body content and report any errors that occured. |
int |
doStartTag()
|
void |
endScope(WriteRenderAppender _writer)
This will close the HTML div associated with the idScope. |
String |
getTagName()
Returns the name of the Tag. |
int |
getTargetDocumentType()
This method will return the TagRenderBase enum value for the document type. |
boolean |
isReporting()
This boolean indicates if an ErrorReporter is reporting errors or not. |
boolean |
isUseLocale()
Gets whether the default locale's language should be used. |
protected void |
localRelease()
Release any acquired resources. |
ArrayList |
returnErrors()
Return an ArrayList of the errors |
void |
setDir(String dir)
Sets the dir value of the html. |
void |
setDocumentType(String docType)
|
void |
setUseLocale(boolean locale)
Sets whether the default locale's language should be used. |
Methods inherited from class ScriptContainer |
---|
addLegacyTagIdMappings, addScriptFunction, addTagIdMappings, getIdScope, getRealIdScope, setGenerateIdScope, setIdScope, writeAfterBlocks, writeBeforeBlocks, writeFrameworkScript, writeScript |
Methods inherited from class BodyTagSupport |
---|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
Methods inherited from class TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Tag |
---|
getParent, setPageContext, setParent |
Field Detail |
---|
public static final String HTML_TAG_ID
ErrorReporter
.
public static final String DOC_TYPE_OVERRIDE
public static final String HTML_401
public static final String HTML_401_QUIRKS
public static final String XHTML_10
Constructor Detail |
---|
public Html()
Method Detail |
---|
public String getTagName()
getTagName
in interface INetuiTag
getTagName
in class ScriptContainer
public int getTargetDocumentType()
public void setDir(String dir)
dir
- - "LTR" or "RTL"public boolean isUseLocale()
public void setUseLocale(boolean locale)
locale
- - true or falsepublic void setDocumentType(String docType)
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class ScriptContainer
JspException
public int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class ScriptContainer
JspException
- if a JSP exception has occurredpublic void endScope(WriteRenderAppender _writer)
_writer
- a writer to write the close tag intopublic void addError(AbstractPageError ape)
addError
in interface IErrorReporter
ape
- - The AbstractPageError to addpublic ArrayList returnErrors()
returnErrors
in interface IErrorReporter
ArrayList
of all errors.public boolean isReporting()
isReporting
in interface IErrorReporter
protected Locale currentLocale()
null
.
protected void localRelease()
localRelease
in class ScriptContainer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |