BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.

com.bea.wlw.netui.tags.html
Class Html

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.bea.wlw.netui.tags.AbstractBaseTag
              extended by com.bea.wlw.netui.tags.html.ScriptContainer
                  extended by com.bea.wlw.netui.tags.html.Html
All Implemented Interfaces:
com.bea.wlw.netui.tags.DocumentRenderingType, ErrorReporter, HtmlConstants, ScriptReporter, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class Html
extends ScriptContainer
implements ErrorReporter, com.bea.wlw.netui.tags.DocumentRenderingType

Generates the html element and performs error handling within its body.

Attribute Descriptions
AttributeRequiredRuntime Expression EvaluationData Bindable
dirNoNoNo
The direction of the HTML, left-to-right (LTR) or right-to-left (RTL).
useLocaleNoNoNo
A boolean specifying whether the html output should include xml:lang=defaultLocale.getLanguage().

See Also:
Serialized Form
Example:
In this sample, the <html> tag uses the default locale and the direction of the HTML is defined as left-to-right (LTR).
      <netui:html dir="LTR" useLocale="true"  />
Beadoc.tagdescription:
Generates an <html> tag and performs error handling within its body.

JavaScript

The <netui:html> tag writes out the following JavaScript functions. These functions are used to map the tagId attributes specified in <netui> tags to the id attributes that are written to the rendered HTML tags.

Some application containers may alter the id attribute of the rendered HTML tags to ensure that all elements on the page have a unique id. (Portal containers can sometimes do this.) In such cases a mapping is created between the tagId's and actual id's rendered in the HTML tags. The following functions are used to return the rendered id values based on the tagId values.

 
 function getNetuiTagName(id, tag) {
     if (scopeId == "") 
         return netui_names[id];
     else
         return netui_names[portletId__id]; }

 function getScopeId(tag) {
     if (tag == null) return "";
     if (tag.scopeId != null) return tag.scopeId;
         return getScopeId(tag.parentElement); }
 

Field Summary
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
          Store the HTML tag instance in the request.
static String XHTML_10
          Constant representing the document type XHTML 1.0 Transitional.
 
Fields inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, JAVASCRIPT_STATUS, NETUI_UNIQUE_CNT
 
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 com.bea.wlw.netui.tags.ErrorReporter
CONTAINER_ERRORS
 
Fields inherited from interface com.bea.wlw.netui.tags.DocumentRenderingType
HTML_RENDERING, HTML_RENDERING_QUIRKS, UNKNOWN_RENDERING, XHTML_RENDERING
 
Fields inherited from interface com.bea.wlw.netui.tags.html.HtmlConstants
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH
 
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
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 doAfterBody()
          Save any body content of this tag, which will generally be the option(s) representing the values displayed to the user.
 int doEndTag()
          Write out the body content and report any errors that occured.
 int doStartTag()
           
 String getDir()
          Gets the dir value of the html.
 String getDocumentType()
           
 int getNextId()
          This method will return the next unique integer within the scope of this tag.
 String getTagName()
          Returns the name of the Tag.
 int getTargetDocumentType()
           
 boolean getUseLocale()
          Gets whether the default locale's language should be used.
 boolean isReporting()
          This boolean indicates if an ErrorReporter is reporting errors or not.
protected  void localRelease()
          Release any acquired resources.
 void reportErrorToBuffer(weblogic.utils.UnsyncStringBuffer sb)
           
 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 com.bea.wlw.netui.tags.html.ScriptContainer
addScriptCode, addScriptFunction, addTagId, getScopeId, isScriptWritten, nextTagIdRef, processIdMap, replaceTagNameRefs, resolveTagIdRef, setScopeId, writeScript, writeScriptBlock
 
Methods inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
addTagIdMapping, containsExpression, evaluateAttributeToString, evaluateExpression, filter, filter, formatErrorString, formatString, getAttribute, getErrorsReport, getExpressionEvaluator, getJavaScriptUtils, getNearestForm, getNextId, getQualifiedBundleName, getScriptReporter, getUserLocale, hasErrors, isExpression, prepForRendering, registerAttribute, registerError, registerTagError, release, removeAttribute, renderAttribute, renderAttributes, reportErrors, rewriteName, setPageContext, updateExpression, write
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, 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, setParent
 

Field Detail

HTML_401

public static final String HTML_401
Constant representing the document type html 4.01

See Also:
Constant Field Values

HTML_401_QUIRKS

public static final String HTML_401_QUIRKS
Constant representing the document type html 4.01

See Also:
Constant Field Values

XHTML_10

public static final String XHTML_10
Constant representing the document type XHTML 1.0 Transitional.

See Also:
Constant Field Values

HTML_TAG_ID

public static final String HTML_TAG_ID
Store the HTML tag instance in the request.

See Also:
Constant Field Values
Constructor Detail

Html

public Html()
Method Detail

getTagName

public String getTagName()
Returns the name of the Tag.

Overrides:
getTagName in class ScriptContainer

getTargetDocumentType

public int getTargetDocumentType()
Specified by:
getTargetDocumentType in interface com.bea.wlw.netui.tags.DocumentRenderingType

getDir

public String getDir()
Gets the dir value of the html.

Returns:
"LTR" or "RTL"

setDir

public void setDir(String dir)
Sets the dir value of the html.

Parameters:
dir - - "LTR" or "RTL"
Beadoc.attributedescription:
The direction of the HTML, left-to-right (LTR) or right-to-left (RTL).
Beadoc.attributesyntaxvalue:
string_dir
Beadoc.databindable:
false

getUseLocale

public boolean getUseLocale()
Gets whether the default locale's language should be used.

Returns:
true or false

setUseLocale

public void setUseLocale(boolean locale)
Sets whether the default locale's language should be used.

Parameters:
locale - - true or false
Beadoc.attributedescription:
A boolean specifying whether the html output should include xml:lang=defaultLocale.getLanguage().
Beadoc.attributesyntaxvalue:
boolean_useLocale
Beadoc.databindable:
false

getDocumentType

public String getDocumentType()

setDocumentType

public void setDocumentType(String docType)

doStartTag

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

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Save any body content of this tag, which will generally be the option(s) representing the values displayed to the user.

Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Overrides:
doAfterBody in class ScriptContainer
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Write out the body content and report any errors that occured.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class ScriptContainer
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

reportErrorToBuffer

public void reportErrorToBuffer(weblogic.utils.UnsyncStringBuffer sb)

addError

public void addError(AbstractPageError ape)
Add an error to the errors being reported by this tag.

Specified by:
addError in interface ErrorReporter
Parameters:
ape - - The AbstractPageError to add

getNextId

public int getNextId()
This method will return the next unique integer within the scope of this tag.

Returns:
a unique integer

returnErrors

public ArrayList returnErrors()
Return an ArrayList of the errors

Specified by:
returnErrors in interface ErrorReporter
Returns:
an ArrayList of all errors.

isReporting

public boolean isReporting()
This boolean indicates if an ErrorReporter is reporting errors or not. The caller should check this before calling addError because the ErrorReporter may be off for some reason.

Specified by:
isReporting in interface ErrorReporter
Returns:
a boolean indicating if the tag is reporting errors or not.

localRelease

protected void localRelease()
Release any acquired resources.

Overrides:
localRelease in class ScriptContainer

currentLocale

protected Locale currentLocale()
Return the current Locale for this request, creating a new one if necessary. If there is no current Locale, and locale support is not requested, return null.

Exclude:

BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.