com.ibm.struts.taglib.html
Class FormTag

java.lang.Object
  extended by org.apache.struts.taglib.html.FormTag
      extended by com.ibm.struts.taglib.html.FormTag

public class FormTag
extends org.apache.struts.taglib.html.FormTag

This class is a simple extension of the Struts form tag to allow creating a Portal link. The FormTag will namescope the name of the form, so this class provides the methods to get the namescoped name.

Since:
4.1

Field Summary
protected  java.lang.String encodedBeanName
          The encoded name of the form bean.
protected  java.lang.String focusTimeout
          The focus timeout
protected  boolean generateMarkup
          generate markup.
protected  java.lang.String name
           
protected  java.lang.String portletMode
          The Portlet mode
protected  java.lang.String scope
           
protected  java.lang.String strutsAction
          The struts action.
protected  java.lang.String type
           
protected  java.lang.String urlType
          The Portlet URL type
protected  boolean validate
          validate form
protected  java.lang.String windowState
          The Portlet window state
 
Constructor Summary
FormTag()
           
 
Method Summary
 int doEndTag()
          Render the end of this form.
 java.lang.String getEncodedBeanName()
          Returns the encoded bean name
 java.lang.String getFocusTimeout()
          Returns the focusTimeout
 boolean getGenerateMarkup()
          Get generate markup.
 java.lang.String getName()
           
 java.lang.String getPortletMode()
          Returns the portlet mode.
 java.lang.String getScope()
           
 java.lang.String getType()
           
 java.lang.String getUrlType()
           
 boolean getValidate()
           
 java.lang.String getWindowState()
          Returns the window state.
protected  void lookup()
          Look up values for the name, scope, and type properties if necessary.
protected  java.lang.String renderFormStartElement()
          Generates the opening <form> element with appropriate attributes.
protected  java.lang.String renderToken()
          Generates a hidden input field with token information, if any.
 void setFocusTimeout(java.lang.String value)
           
 void setGenerateMarkup(boolean generate)
          Set whether or not to generate markup.
 void setName(java.lang.String name)
           
 void setPortletMode(java.lang.String portletMode)
          Set the portlet mode.
 void setScope(java.lang.String scope)
           
 void setType(java.lang.String type)
           
 void setUrlType(java.lang.String urlType)
           
 void setValidate(boolean validate)
           
 void setWindowState(java.lang.String windowState)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encodedBeanName

protected java.lang.String encodedBeanName
The encoded name of the form bean. This name is namescoped to be unique in Portal


urlType

protected java.lang.String urlType
The Portlet URL type


name

protected java.lang.String name

scope

protected java.lang.String scope

type

protected java.lang.String type

windowState

protected java.lang.String windowState
The Portlet window state


focusTimeout

protected java.lang.String focusTimeout
The focus timeout


portletMode

protected java.lang.String portletMode
The Portlet mode


validate

protected boolean validate
validate form


strutsAction

protected java.lang.String strutsAction
The struts action. This may need to be set as a hidden input parameter if method=get is set.


generateMarkup

protected boolean generateMarkup
generate markup. When set to false no markup will be generated. This can be useful in the case where the setup of the ActionForm is required, but the markup is generated by another means. Default is true

Constructor Detail

FormTag

public FormTag()
Method Detail

getUrlType

public java.lang.String getUrlType()

setUrlType

public void setUrlType(java.lang.String urlType)

getWindowState

public java.lang.String getWindowState()
Returns the window state.

Returns:
String the window state, can be null

setWindowState

public void setWindowState(java.lang.String windowState)

getFocusTimeout

public java.lang.String getFocusTimeout()
Returns the focusTimeout

Returns:
String the window state, can be null

setFocusTimeout

public void setFocusTimeout(java.lang.String value)

getPortletMode

public java.lang.String getPortletMode()
Returns the portlet mode.

Returns:
String the portlet mode, can be null

setPortletMode

public void setPortletMode(java.lang.String portletMode)
Set the portlet mode.

Parameters:
portletMode - the portlet mode

getValidate

public boolean getValidate()

setValidate

public void setValidate(boolean validate)

getGenerateMarkup

public boolean getGenerateMarkup()
Get generate markup.

Returns:
boolean true if markup should be generated

setGenerateMarkup

public void setGenerateMarkup(boolean generate)
Set whether or not to generate markup.

Parameters:
generate - rue if markup should be generated

renderFormStartElement

protected java.lang.String renderFormStartElement()
Generates the opening <form> element with appropriate attributes.

Since:
Struts 1.1

doEndTag

public int doEndTag()
             throws JspException
Render the end of this form.

Throws:
JspException - if a JSP exception has occurred

lookup

protected void lookup()
               throws JspException
Look up values for the name, scope, and type properties if necessary.

Throws:
JspException - if a required value cannot be looked up

getEncodedBeanName

public java.lang.String getEncodedBeanName()
Returns the encoded bean name

Returns:
String encode bean name

renderToken

protected java.lang.String renderToken()
Generates a hidden input field with token information, if any.

Returns:
A hidden input field containing the token.
Since:
Struts 1.1

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getScope

public java.lang.String getScope()

setScope

public void setScope(java.lang.String scope)

getType

public java.lang.String getType()

setType

public void setType(java.lang.String type)