|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hivemind.impl.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.form.AbstractFormComponent
org.apache.tapestry.form.Submit
public abstract class Submit
Implements a component that manages an HTML <input type=submit> form element. [ Component Reference ]
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
ImageSubmitwhich accomplishes much the same thing, but uses a graphic image instead.
| Field Summary |
|---|
| Fields inherited from class org.apache.tapestry.AbstractComponent |
|---|
_body, _bodyCount |
| Constructor Summary | |
|---|---|
Submit()
|
|
| Method Summary | |
|---|---|
abstract IActionListener |
getAction()
parameter. |
abstract boolean |
getDefer()
parameter. |
abstract IEngineService |
getDirectService()
Injected. |
abstract String |
getLabel()
parameter. |
abstract IActionListener |
getListener()
parameter. |
abstract ListenerInvoker |
getListenerInvoker()
Injected. |
abstract Object |
getParameters()
parameter. |
abstract IScript |
getSubmitScript()
Injected. |
abstract String |
getSubmitType()
The type of submission, normal/cancel/refresh. |
abstract Object |
getTag()
parameter. |
abstract List |
getUpdateComponents()
If set, will be used to update/refresh portions of a response during XHR requests. |
abstract boolean |
isAsync()
Used to specify whether or not the result of this invocation should be returned asynchronously or use normal browser page reload semantics. |
protected boolean |
isClicked(IRequestCycle cycle,
String name)
Determine if this submit component was clicked. |
abstract boolean |
isJson()
Used to specify that the return invocation of the response created should be in the "http://json.org" format. |
protected void |
renderFormComponent(IMarkupWriter writer,
IRequestCycle cycle)
Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle)
to render the component. |
protected void |
renderSubmitBindings(IMarkupWriter writer,
IRequestCycle cycle)
Manages rendering of important submit client side bindings, like invoking the right submit type or any of the optional IDynamicInvoker parameters. |
protected void |
rewindFormComponent(IMarkupWriter writer,
IRequestCycle cycle)
Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle) to rewind the
component. |
abstract void |
setSelected(Object tag)
parameter. |
| Methods inherited from class org.apache.tapestry.form.AbstractFormComponent |
|---|
generateClientId, getCanTakeFocus, getForm, getIdParameter, getName, getRenderBodyOnRewind, isRequired, peekClientId, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, setForm, setName, setName |
| Methods inherited from class org.apache.hivemind.impl.BaseLocatable |
|---|
getLocation, setLocation |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| 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, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName |
| 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 |
|---|
public Submit()
| Method Detail |
|---|
protected boolean isClicked(IRequestCycle cycle,
String name)
cycle - The current request.name - The name of this form element.
protected void renderFormComponent(IMarkupWriter writer,
IRequestCycle cycle)
AbstractFormComponentAbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle)
to render the component.
renderFormComponent in class AbstractFormComponentAbstractFormComponent.renderFormComponent(org.apache.tapestry.IMarkupWriter,
org.apache.tapestry.IRequestCycle)public abstract String getLabel()
protected void rewindFormComponent(IMarkupWriter writer,
IRequestCycle cycle)
AbstractFormComponentAbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle) to rewind the
component. If the component is disabled
this will not be invoked.
rewindFormComponent in class AbstractFormComponentAbstractFormComponent.rewindFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)
protected void renderSubmitBindings(IMarkupWriter writer,
IRequestCycle cycle)
IDynamicInvoker parameters.
writer - The writer to use to write content.cycle - The current request cycle.public abstract IActionListener getListener()
public abstract IActionListener getAction()
public abstract Object getTag()
public abstract void setSelected(Object tag)
public abstract boolean getDefer()
public abstract Object getParameters()
public abstract String getSubmitType()
public abstract List getUpdateComponents()
For instance, if you have a page listing projects and you wanted to update an
Any components contents whenever one of the project links was clicked
you would use a DirectLink with the parameters:
updateComponents="{'projectDetails'}"
async="true"
getUpdateComponents in interface IDynamicInvokerpublic abstract boolean isAsync()
Async being true means responses will be encoded as XML using XmlHttpRequests. If you would like
your request/response to be in another format - like JSON - you must also specify the additional
parameter IDynamicInvoker.isJson(). Without setting the IDynamicInvoker.getUpdateComponents() parameter
this parameter is pretty useless.
isAsync in interface IDynamicInvokerIDynamicInvoker.isJson()public abstract boolean isJson()
IDynamicInvoker.getUpdateComponents() parameter
this parameter is pretty useless.
isJson in interface IDynamicInvokerorg.apache.tapestry.IJSONRender}public abstract IEngineService getDirectService()
public abstract ListenerInvoker getListenerInvoker()
public abstract IScript getSubmitScript()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||