net.sf.tacos.ajax.components
Class AbstractSubmit

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.form.AbstractFormComponent
              extended by net.sf.tacos.ajax.components.AbstractSubmit
All Implemented Interfaces:
AjaxInvocation, AjaxSubmitInvocation, Locatable, LocationHolder, org.apache.tapestry.form.IFormComponent, org.apache.tapestry.IComponent, org.apache.tapestry.IRender
Direct Known Subclasses:
AjaxEventSubmit, AjaxImageSubmit, AjaxLinkSubmit, AjaxSubmit

public abstract class AbstractSubmit
extends org.apache.tapestry.form.AbstractFormComponent
implements AjaxSubmitInvocation

Superclass for components submitting their form.


Constructor Summary
AbstractSubmit()
           
 
Method Summary
 Map constructScriptParameter(org.apache.tapestry.IRequestCycle cycle)
          Construct the parameter used by script.
abstract  org.apache.tapestry.IActionListener getAction()
          parameter
 org.apache.tapestry.engine.ILink getAjaxLink()
          Generates ajax link for form submission via javascript
abstract  boolean getDefer()
          parameter
 String getEncodingType()
          Should return null if current form is not a AjaxForm.
abstract  String getFocusElement()
          Component id string to focus after the ajax request.
abstract  org.apache.tapestry.IActionListener getListener()
          parameter
abstract  org.apache.tapestry.listener.ListenerInvoker getListenerInvoker()
          Injected
abstract  Object getParameters()
          parameter
abstract  Object getTag()
          parameter
protected  void handleClick(org.apache.tapestry.IRequestCycle cycle, org.apache.tapestry.IForm form)
          Handles button clicked events
protected abstract  boolean isClicked(org.apache.tapestry.IRequestCycle cycle, String name)
          Determine if this submit component was clicked.
protected  void rewindFormComponent(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle)
           
abstract  void setSelected(Object tag)
          parameter
 
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent
getAlwaysRenderBodyOnRewind, getCanTakeFocus, getForm, getIdParameter, getName, isRequired, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, renderFormComponent, renderIdAttribute, setClientId, setForm, setName, setName
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.tacos.ajax.AjaxSubmitInvocation
getComponentId, getFunctionName, getHiddenId, isClientSideValidationEnabled, isDeferred, isSubmitNormal
 
Methods inherited from interface net.sf.tacos.ajax.AjaxInvocation
getAjaxEngine, getBackLink, getEffects, getForwardLink, getPopup, getPreEffects, getStatusElement, getUpdateComponents, getUpdateObject
 
Methods inherited from interface org.apache.tapestry.form.IFormComponent
getClientId, getDisplayName, isDisabled
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

AbstractSubmit

public AbstractSubmit()
Method Detail

getFocusElement

public abstract String getFocusElement()
Component id string to focus after the ajax request.


isClicked

protected abstract boolean isClicked(org.apache.tapestry.IRequestCycle cycle,
                                     String name)
Determine if this submit component was clicked.

Parameters:
cycle -
name -
Returns:
true if this submit was clicked

rewindFormComponent

protected void rewindFormComponent(org.apache.tapestry.IMarkupWriter writer,
                                   org.apache.tapestry.IRequestCycle cycle)
Specified by:
rewindFormComponent in class org.apache.tapestry.form.AbstractFormComponent
See Also:
AbstractFormComponent.rewindFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)

handleClick

protected void handleClick(org.apache.tapestry.IRequestCycle cycle,
                           org.apache.tapestry.IForm form)
Handles button clicked events

Parameters:
cycle -
form -

getListener

public abstract org.apache.tapestry.IActionListener getListener()
parameter


getAction

public abstract org.apache.tapestry.IActionListener getAction()
parameter


getTag

public abstract Object getTag()
parameter


setSelected

public abstract void setSelected(Object tag)
parameter


getDefer

public abstract boolean getDefer()
parameter


getParameters

public abstract Object getParameters()
parameter


getListenerInvoker

public abstract org.apache.tapestry.listener.ListenerInvoker getListenerInvoker()
Injected


constructScriptParameter

public Map constructScriptParameter(org.apache.tapestry.IRequestCycle cycle)
Construct the parameter used by script.

Parameters:
cycle -
Returns:
script parameter map

getEncodingType

public String getEncodingType()
Description copied from interface: AjaxInvocation
Should return null if current form is not a AjaxForm.

Specified by:
getEncodingType in interface AjaxInvocation
Returns:
encoding type

getAjaxLink

public org.apache.tapestry.engine.ILink getAjaxLink()
Generates ajax link for form submission via javascript

Specified by:
getAjaxLink in interface AjaxInvocation
Returns:
ILink to be used in async io javascript calls