com.plumtree.xpshared.htmlelements
Class HTMLOption

java.lang.Object
  extended by com.plumtree.xpshared.htmlelements.HTMLElement
      extended by com.plumtree.xpshared.htmlelements.HTMLOption
All Implemented Interfaces:
java.lang.Cloneable

public class HTMLOption
extends HTMLElement



Spec


Nested Class Summary
 
Nested classes/interfaces inherited from class com.plumtree.xpshared.htmlelements.HTMLElement
HTMLElement.ValidationLevel
 
Field Summary
 
Fields inherited from class com.plumtree.xpshared.htmlelements.HTMLElement
aNewLine, bAllowEvents, bAllowSetStyleClassWithString, bCheckNestedStringForHTML, bDisplayDidPause, bEnforceMaxTableDepth, bForceFormattingOff, bForceFormattingOn, bPauseAfterDisplay, bPrintComments, bResumingAndChildFinished, bResumingAndChildInMidRender, bShowLang, iMaxTableDepth, sLangLocal, sNewLine, sTab
 
Constructor Summary
HTMLOption(java.lang.String sTagValue)
           
HTMLOption(java.lang.String sTagValue, java.lang.String sDisplayText)
           
 
Method Summary
protected  void AppendBeginningOfOpeningTag(boolean bFormat, XPStringBuilder sb, IXPResponse response)
          This method generates the beginning of the opening tag.
protected  void AppendClosingTag(boolean bFormat, XPStringBuilder sb, IXPResponse response)
          This method generates the closing tag of this html element.
 boolean GetSelected()
          Call this method to determine whether or not this option is selected.
 java.lang.String GetValue()
          Call this method to obtain the value of the value attribute.
protected  boolean ProvidesClosingTag()
          Indicates whether or not this HTML element provides a closing tag.
 void SetName(java.lang.String s)
          Method rewritten to prevent usage.
 void SetSelected(boolean b)
          Call this method to set this option selected.
 void SetValue(java.lang.String s)
          Call this method to set the value attribute.
 
Methods inherited from class com.plumtree.xpshared.htmlelements.HTMLElement
AddInnerHTMLElement, AddInnerHTMLEncodedString, AddInnerHTMLString, AppendClosingLineBreak, CleanupHTMLSubtreeAfterRendering, ClearInnerHTMLElements, clone, Display, Display, ForceFormattingOff, GetChildInMidRender, GetClone, GetDisabled, GetDisplayDidPause, GetDisplayOptions, GetDisplayString, GetDisplayString, GetDisplayString, GetDo508Checking, GetDoFormat, GetElementName, GetForceLineBreaksAfterSafeElements, GetHTMLElementReadOnly, GetID, GetImgBaseUrl, GetInnerHTML, GetInnerHTML, GetInnerHTMLDisplayString, GetInnerHTMLElements, GetInnerHTMLElementsAsArrayList, GetIsNetscape, GetLang, GetLastChildFullyRendered, GetName, GetOnClick, GetOnKeyDown, GetOnKeyPress, GetOnKeyUp, GetOnMouseOut, GetOnMouseOver, GetPauseAfterDisplay, GetPostComment, GetPreComment, GetStringBuilder, GetStyle, GetStyleClass, GetStyleClassPrefix, GetTitle, GetValidationLevel, InsertInnerHTMLElement, InternalWrite, SaveToTempFile, SaveToTempFile, SetChildInMidRender, SetDisabled, SetDisplayOptions, SetDo508Checking, SetDoFormat, SetElementName, SetFlushAfterDisplay, SetForceLineBreaksAfterSafeElements, SetHTMLElementReadOnly, SetID, SetImgBaseUrl, SetInner, SetIsNetscape, SetLangGlobal, SetLangLocal, SetLastChildFullyRendered, SetOnClick, SetOnKeyDown, SetOnKeyPress, SetOnKeyUp, SetOnMouseOut, SetOnMouseOver, SetPauseAfterDisplay, SetPostComment, SetPreComment, SetStyle, SetStyleClass, SetStyleClass, SetStyleClassPrefix, SetTitle, SetValidationLevel, ToByteArray, VerifyWritability, WriteNugget, WriteNugget
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLOption

public HTMLOption(java.lang.String sTagValue)
Parameters:
sTagValue - Pass the value string of this option.

HTMLOption

public HTMLOption(java.lang.String sTagValue,
                  java.lang.String sDisplayText)
Parameters:
sTagValue - value attribute
sDisplayText - text node to be inserted inside
Method Detail

GetSelected

public boolean GetSelected()
Call this method to determine whether or not this option is selected.

Returns:
boolean value

GetValue

public java.lang.String GetValue()
Call this method to obtain the value of the value attribute.

Returns:
String value

SetName

public void SetName(java.lang.String s)
Method rewritten to prevent usage.

Overrides:
SetName in class HTMLElement
Parameters:
s - String
Throws:
HTMLException - This method throws an exception.

SetSelected

public void SetSelected(boolean b)
Call this method to set this option selected.

Parameters:
b - boolean value.

SetValue

public void SetValue(java.lang.String s)
Call this method to set the value attribute.

Parameters:
s - String value

AppendBeginningOfOpeningTag

protected void AppendBeginningOfOpeningTag(boolean bFormat,
                                           XPStringBuilder sb,
                                           IXPResponse response)
This method generates the beginning of the opening tag. The abstract HTMLElement superclass will provide the remainder of the opening tag, repleate with attributes common to all html elements, such as name, and id, and class.

Specified by:
AppendBeginningOfOpeningTag in class HTMLElement
Parameters:
bFormat - boolean indicating whether or not to format.
sb - XPStringBuilder
response - IXPResponse

AppendClosingTag

protected void AppendClosingTag(boolean bFormat,
                                XPStringBuilder sb,
                                IXPResponse response)
This method generates the closing tag of this html element. If the providesClosingTag method returns false, then this method will never be called.

Specified by:
AppendClosingTag in class HTMLElement
Parameters:
bFormat - boolean indicating whether or not to format.
sb - XPStringBuilder
response - IXPResponse

ProvidesClosingTag

protected boolean ProvidesClosingTag()
Indicates whether or not this HTML element provides a closing tag. Some elements only provide opening tags, such as the <br> element.

Specified by:
ProvidesClosingTag in class HTMLElement
Returns:
boolean true.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.