|
||||||||||
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.LinkSubmit
public abstract class LinkSubmit
Implements a component that submits its enclosing form via a JavaScript link. [ Component Reference ]
Field Summary | |
---|---|
static String |
ATTRIBUTE_NAME
The name of an IRequestCycle attribute in which the current
submit link is stored. |
Fields inherited from class org.apache.tapestry.AbstractComponent |
---|
_body, _bodyCount |
Constructor Summary | |
---|---|
LinkSubmit()
|
Method Summary | |
---|---|
protected void |
cleanupAfterRender(IRequestCycle cycle)
Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle) after the component renders. |
abstract IActionListener |
getAction()
parameter. |
protected boolean |
getCanTakeFocus()
Links can not take focus, ever. |
abstract boolean |
getDefer()
parameter. |
abstract IEngineService |
getDirectService()
Injected. |
abstract IActionListener |
getListener()
parameter. |
abstract ListenerInvoker |
getListenerInvoker()
Injected. |
abstract Object |
getParameters()
parameter. |
protected boolean |
getRenderBodyOnRewind()
Returns true; the LinkSubmit's body should render during a rewind, even if the component is itself disabled. |
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)
Checks the submit name ( FormConstants.SUBMIT_NAME_PARAMETER ) to see if it matches
this LinkSubmit's assigned element name. |
abstract boolean |
isJson()
Used to specify that the return invocation of the response created should be in the "http://json.org" format. |
protected void |
prepareForRender(IRequestCycle cycle)
Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle) to prepare the component to render. |
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, getForm, getIdParameter, getName, 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 |
Field Detail |
---|
public static final String ATTRIBUTE_NAME
IRequestCycle
attribute in which the current
submit link is stored. LinkSubmits do not nest.
Constructor Detail |
---|
public LinkSubmit()
Method Detail |
---|
protected boolean isClicked(IRequestCycle cycle, String name)
FormConstants.SUBMIT_NAME_PARAMETER
) to see if it matches
this LinkSubmit's assigned element name.
cycle
- The current request.name
- The name of this form element.
protected void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle)
AbstractFormComponent
AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle)
to render the component.
renderFormComponent
in class AbstractFormComponent
AbstractFormComponent.renderFormComponent(org.apache.tapestry.IMarkupWriter,
org.apache.tapestry.IRequestCycle)
protected void prepareForRender(IRequestCycle cycle)
AbstractComponent
AbstractComponent.render(IMarkupWriter, IRequestCycle)
to prepare the component to render.
This implementation sets JavaBeans properties from matching bound parameters. The default
implementation of this method is empty.
prepareForRender
in class AbstractComponent
AbstractComponent.prepareForRender(org.apache.tapestry.IRequestCycle)
protected void cleanupAfterRender(IRequestCycle cycle)
AbstractComponent
AbstractComponent.render(IMarkupWriter, IRequestCycle)
after the component renders.
cleanupAfterRender
in class AbstractComponent
AbstractComponent.cleanupAfterRender(org.apache.tapestry.IRequestCycle)
protected boolean getCanTakeFocus()
getCanTakeFocus
in class AbstractFormComponent
protected boolean getRenderBodyOnRewind()
getRenderBodyOnRewind
in class AbstractFormComponent
protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle)
AbstractFormComponent
AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle)
to rewind the
component. If the component is disabled
this will not be invoked.
rewindFormComponent
in class AbstractFormComponent
AbstractFormComponent.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 IDynamicInvoker
public 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 IDynamicInvoker
IDynamicInvoker.isJson()
public abstract boolean isJson()
IDynamicInvoker.getUpdateComponents()
parameter
this parameter is pretty useless.
isJson
in interface IDynamicInvoker
org.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 |