it.eng.spago.taglib.html
Class RadioTag

java.lang.Object
  extended by BodyTagSupport
      extended by it.eng.spago.taglib.html.BaseHandlerTag
          extended by it.eng.spago.taglib.html.RadioTag

public class RadioTag
extends BaseHandlerTag

Tag for input fields of type "radio".

Version:
$Rev: 376841 $ $Date: 2005-06-14 14:26:17 -0400 (Tue, 14 Jun 2005) $

Field Summary
protected  java.lang.String idName
           
protected static MessageBundleReference messages
          The message resources for this package.
protected  java.lang.String name
           
protected  java.lang.String property
          The property name for this field.
protected  java.lang.String text
          The body content of this tag (if any).
protected  java.lang.String value
          The server value for this option.
 
Fields inherited from class it.eng.spago.taglib.html.BaseHandlerTag
accesskey, doDisabled, doReadonly, indexed, tabindex
 
Constructor Summary
RadioTag()
           
 
Method Summary
 int doAfterBody()
          Save the associated label from the body content.
 int doEndTag()
          Optionally render the associated label from the body content.
 int doStartTag()
          Generate the required input tag.
 java.lang.String getProperty()
          Return the property name.
 java.lang.String getScope()
           
 java.lang.String getValue()
          Return the server value.
protected  java.lang.String prepareName()
          Prepare the name element
 void release()
          Release any acquired resources.
protected  java.lang.String renderRadioElement(java.lang.String serverValue, java.lang.String checkedValue)
          Renders an HTML <input type="radio"> element.
 void setIdName(java.lang.String idName)
           
 void setName(java.lang.String name)
           
 void setProperty(java.lang.String property)
          Set the property name.
 void setScope(java.lang.String scope)
           
 void setValue(java.lang.String value)
          Set the server value.
 
Methods inherited from class it.eng.spago.taglib.html.BaseHandlerTag
doErrorsExist, getAccesskey, getAlt, getAltKey, getBundle, getDisabled, getElementClose, getErrorStyle, getErrorStyleClass, getErrorStyleId, getIndexed, getIndexValue, getOnblur, getOnchange, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getOnselect, getReadonly, getStyle, getStyleClass, getStyleId, getTabindex, getTitle, getTitleKey, isXhtml, lookupProperty, message, prepareAttribute, prepareEventHandlers, prepareFocusEvents, prepareIndex, prepareKeyEvents, prepareMouseEvents, prepareOtherAttributes, prepareStyles, prepareTextEvents, setAccesskey, setAlt, setAltKey, setBundle, setDisabled, setErrorStyle, setErrorStyleClass, setErrorStyleId, setIndexed, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setOnselect, setReadonly, setStyle, setStyleClass, setStyleId, setTabindex, setTitle, setTitleKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

messages

protected static MessageBundleReference messages
The message resources for this package.


property

protected java.lang.String property
The property name for this field.


text

protected java.lang.String text
The body content of this tag (if any).


name

protected java.lang.String name

value

protected java.lang.String value
The server value for this option.


idName

protected java.lang.String idName
Constructor Detail

RadioTag

public RadioTag()
Method Detail

getProperty

public java.lang.String getProperty()
Return the property name.


setProperty

public void setProperty(java.lang.String property)
Set the property name.

Parameters:
property - The new property name

getValue

public java.lang.String getValue()
Return the server value.


setValue

public void setValue(java.lang.String value)
Set the server value.

Parameters:
value - The new server value

setIdName

public void setIdName(java.lang.String idName)

doStartTag

public int doStartTag()
               throws JspException
Generate the required input tag. [Indexed property since Struts 1.1]

Throws:
JspException - if a JSP exception has occurred

renderRadioElement

protected java.lang.String renderRadioElement(java.lang.String serverValue,
                                              java.lang.String checkedValue)
                                       throws JspException
Renders an HTML <input type="radio"> element.

Parameters:
serverValue - The data to be used in the tag's value attribute and sent to the server when the form is submitted.
checkedValue - If the serverValue equals this value the radio button will be checked.
Returns:
A radio input element.
Throws:
JspException
Since:
Struts 1.1

doAfterBody

public int doAfterBody()
                throws JspException
Save the associated label from the body content.

Throws:
JspException - if a JSP exception has occurred

doEndTag

public int doEndTag()
             throws JspException
Optionally render the associated label from the body content.

Throws:
JspException - if a JSP exception has occurred

prepareName

protected java.lang.String prepareName()
                                throws JspException
Prepare the name element

Overrides:
prepareName in class BaseHandlerTag
Returns:
The element name.
Throws:
JspException

release

public void release()
Release any acquired resources.

Overrides:
release in class BaseHandlerTag

setName

public void setName(java.lang.String name)

getScope

public java.lang.String getScope()

setScope

public void setScope(java.lang.String scope)