com.primix.tapestry.form
Class Submit

java.lang.Object
  |
  +--com.primix.tapestry.AbstractComponent
        |
        +--com.primix.tapestry.form.AbstractFormComponent
              |
              +--com.primix.tapestry.form.Submit
All Implemented Interfaces:
IComponent, IFormComponent, IRender

public class Submit
extends AbstractFormComponent

Implements a component that manages an HTML <submit> form element.

This component is generally only used when the form has multiple submit buttons, and it is important for the application to know which one was pressed. You may also want to use ImageSubmit which accomplishes much the same thing, but uses a graphic image instead.
Parameter Type Read / Write Required Default Description
label java.lang.String R no   The label put on the button (this becomes the HTML value attribute).
disabled boolean R no false If set to true, the button will be disabled (will not respond to the mouse); the browser should provide a "greyed out" appearance.
selected java.lang.Object W yes   This parameter is bound to a property that is updated when the submit button is clicked by the user. The property is updated to match the tag parameter.
tag java.lang.Object R yes   Tag used with the selected parameter to indicate which Submit button on a form was clicked.

Allows informal parameters, but may not contain a body.

Version:
$Id: Submit.java,v 1.9 2001/08/28 20:33:41 hship Exp $
Author:
Howard Ship

Fields inherited from class com.primix.tapestry.AbstractComponent
id, page, specification, wrapped, wrappedCount
 
Constructor Summary
Submit()
           
 
Method Summary
 IBinding getDisabledBinding()
           
 IBinding getLabelBinding()
           
 java.lang.String getName()
          Returns the name of the component, which is automatically generated during renderring.
 IBinding getSelectedBinding()
           
 IBinding getTagBinding()
           
 void render(IResponseWriter writer, IRequestCycle cycle)
          The principal rendering/rewinding method.
 void setDisabledBinding(IBinding value)
           
 void setLabelBinding(IBinding value)
           
 void setSelectedBinding(IBinding value)
           
 void setTagBinding(IBinding value)
           
 
Methods inherited from class com.primix.tapestry.form.AbstractFormComponent
getForm, getForm
 
Methods inherited from class com.primix.tapestry.AbstractComponent
addAsset, addComponent, addWrapped, cleanupAfterRender, cleanupComponent, finishLoad, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getPage, getSpecification, prepareForRender, renderWrapped, reset, setBinding, setContainer, setId, setPage, setSpecification, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.primix.tapestry.IComponent
addAsset, addComponent, addWrapped, finishLoad, getAsset, getAssets, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getPage, getSpecification, renderWrapped, setBinding, setContainer, setId, setPage, setSpecification
 

Constructor Detail

Submit

public Submit()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: IFormComponent
Returns the name of the component, which is automatically generated during renderring.

This value is set inside the component's render method and is not cleared. If the component is inside a Foreach, the value returned is the most recent name generated for the component.

This property is made available to facilitate writing JavaScript that allows components (in the client web browser) to interact.

In practice, a Script component works with the Body component to get the JavaScript code inserted and referenced.

Overrides:
getName in class AbstractFormComponent

getLabelBinding

public IBinding getLabelBinding()

setLabelBinding

public void setLabelBinding(IBinding value)

getDisabledBinding

public IBinding getDisabledBinding()

setDisabledBinding

public void setDisabledBinding(IBinding value)

setSelectedBinding

public void setSelectedBinding(IBinding value)

getSelectedBinding

public IBinding getSelectedBinding()

setTagBinding

public void setTagBinding(IBinding value)

getTagBinding

public IBinding getTagBinding()

render

public void render(IResponseWriter writer,
                   IRequestCycle cycle)
            throws RequestCycleException
Description copied from interface: IRender
The principal rendering/rewinding method. This will cause the receiving component to render its top level elements (HTML text and components).

Renderring and rewinding are the exact same process. The same code that renders must be able to restore state by going through the exact same operations (even though the output is discarded).