|
||||||||||
| 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
net.sf.tacos.ajax.components.AjaxForm
public abstract class AjaxForm
Overrides default Form behaviour.
| Nested Class Summary | |
|---|---|
protected class |
AjaxForm.RenderInformalParameters
Handles rendering informal parameters for form in a runnable. |
| Field Summary | |
|---|---|
protected AjaxFormSupport |
formSupport
Form support. |
protected String |
name
Unique form name. |
protected org.apache.tapestry.IRender |
renderInformalParameters
Renderer |
| Fields inherited from interface org.apache.tapestry.IForm |
|---|
ATTRIBUTE_NAME |
| Constructor Summary | |
|---|---|
AjaxForm()
|
|
| Method Summary | |
|---|---|
void |
addDeferredRunnable(Runnable runnable)
|
void |
addEventHandler(org.apache.tapestry.form.FormEventType type,
String functionName)
Adds an additional event handler. |
void |
addHiddenValue(String name,
String value)
|
void |
addHiddenValue(String name,
String id,
String value)
|
protected void |
cleanupAfterRender(org.apache.tapestry.IRequestCycle cycle)
|
protected String |
constructFormNameForActionService(String actionId)
Construct a form name for use with the action service. |
Map |
constructScriptParameter(org.apache.tapestry.IRequestCycle cycle)
Construct the parameter used by script. |
static org.apache.tapestry.IForm |
get(org.apache.tapestry.IRequestCycle cycle)
Deprecated. Use TapestryUtils.getForm(IRequestCycle, IComponent) instead. |
abstract org.apache.tapestry.engine.IEngineService |
getActionService()
Injected. |
org.apache.tapestry.engine.ILink |
getAjaxLink()
Generates ajax link for form submission via javascript |
abstract AjaxWebRequest |
getAjaxRequest()
Injected request. |
abstract org.apache.tapestry.IActionListener |
getCancel()
cancel parameter, may be null |
abstract org.apache.tapestry.valid.IValidationDelegate |
getDelegate()
delegate parameter, which has a default (starting in release 4.0). |
abstract org.apache.tapestry.engine.IEngineService |
getDirectService()
Injected. |
String |
getElementId(org.apache.tapestry.form.IFormComponent component)
Constructs a unique identifier (within the Form). |
String |
getElementId(org.apache.tapestry.form.IFormComponent component,
String baseId)
Constructs a unique identifier from the base id. |
String |
getEncodingType()
Should return null if current form is not a AjaxForm. |
abstract org.apache.tapestry.IActionListener |
getListener()
listener parameter, may be null |
abstract org.apache.tapestry.listener.ListenerInvoker |
getListenerInvoker()
Injected |
abstract String |
getMethod()
method parameter |
String |
getName()
Returns the name generated for the form. |
abstract Integer |
getPort()
port parameter, may be null |
abstract org.apache.tapestry.IActionListener |
getRefresh()
refresh parameter, may be null |
boolean |
getRequiresSession()
Returns true if the stateful parameter is bound to a true value. |
abstract org.apache.tapestry.web.WebResponse |
getResponse()
Injected |
abstract String |
getScheme()
scheme parameter, may be null |
abstract org.apache.tapestry.IScript |
getScript()
Injected tacos js. |
abstract org.apache.tapestry.IActionListener |
getSuccess()
success parameter, may be null |
abstract boolean |
isDirect()
Returns true if this Form is configured to use the direct service. |
boolean |
isRewinding()
Indicates to any wrapped form components that they should respond to the form submission. |
abstract boolean |
isStateful()
stateful parameter |
protected AjaxFormSupport |
newFormSupport(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IRequestCycle cycle)
Returns a new instance of AjaxFormSupport. |
protected void |
prepareForRender(org.apache.tapestry.IRequestCycle cycle)
|
void |
prerenderField(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IComponent field,
Location location)
|
void |
registerForFocus(org.apache.tapestry.form.IFormComponent field,
int priority)
|
protected void |
renderComponent(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IRequestCycle cycle)
|
protected void |
renderComponentDelegate(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IRequestCycle cycle)
Renders delegate components. |
void |
rewind(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IRequestCycle cycle)
Overriden so that AjaxWebRequest will be put back as an attribute
on the IRequestCycle after rewind. |
void |
setEncodingType(String encodingType)
|
void |
trigger(org.apache.tapestry.IRequestCycle cycle)
Method invoked by the direct service. |
boolean |
wasPrerendered(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IComponent field)
|
| Methods inherited from class org.apache.tapestry.AbstractComponent |
|---|
addAsset, addBody, addComponent, checkActiveLock, 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, 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 org.apache.tapestry.IForm |
|---|
getFocus, isClientValidationEnabled |
| 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 |
| Methods inherited from interface net.sf.tacos.ajax.AjaxInvocation |
|---|
getAjaxEngine, getBackLink, getEffects, getForwardLink, getPopup, getPreEffects, getStatusElement, getUpdateComponents, getUpdateObject |
| Field Detail |
|---|
protected String name
protected AjaxFormSupport formSupport
protected org.apache.tapestry.IRender renderInformalParameters
| Constructor Detail |
|---|
public AjaxForm()
| Method Detail |
|---|
public abstract org.apache.tapestry.IScript getScript()
public abstract AjaxWebRequest getAjaxRequest()
protected void renderComponent(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IRequestCycle cycle)
renderComponent in class org.apache.tapestry.AbstractComponentpublic Map constructScriptParameter(org.apache.tapestry.IRequestCycle cycle)
cycle -
public org.apache.tapestry.engine.ILink getAjaxLink()
getAjaxLink in interface AjaxInvocationILink to be used in async io javascript calls
public void rewind(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IRequestCycle cycle)
AjaxWebRequest will be put back as an attribute
on the IRequestCycle after rewind.
rewind in interface org.apache.tapestry.IFormpublic static org.apache.tapestry.IForm get(org.apache.tapestry.IRequestCycle cycle)
TapestryUtils.getForm(IRequestCycle, IComponent) instead.
IForm, or null if no form is active. This is a
convienience method, the result will be null, or an instance of IForm, but not
necessarily a Form.
public boolean isRewinding()
isRewinding in interface org.apache.tapestry.FormBehaviorpublic abstract org.apache.tapestry.engine.IEngineService getDirectService()
public abstract org.apache.tapestry.engine.IEngineService getActionService()
public abstract boolean isDirect()
This is derived from the direct parameter, and defaults to true if not bound.
public boolean getRequiresSession()
getRequiresSession in interface org.apache.tapestry.IActionpublic String getElementId(org.apache.tapestry.form.IFormComponent component)
Simply invokes
getElementId(org.apache.tapestry.form.IFormComponent, java.lang.String)with the
component's id.
getElementId in interface org.apache.tapestry.FormBehavior
public String getElementId(org.apache.tapestry.form.IFormComponent component,
String baseId)
This method is provided simply so that some components (ImageSubmit)
have more specific control over their names.
getElementId in interface org.apache.tapestry.FormBehaviorpublic String getName()
This value is generated when the form renders, and is not cleared. If the Form is inside a
Foreach, this will be the most recently generated
name for the Form.
This property is exposed so that sophisticated applications can write JavaScript handlers for the form and components within the form.
getName in interface org.apache.tapestry.IFormAbstractFormComponent.getName()protected void prepareForRender(org.apache.tapestry.IRequestCycle cycle)
prepareForRender in class org.apache.tapestry.AbstractComponentprotected void cleanupAfterRender(org.apache.tapestry.IRequestCycle cycle)
cleanupAfterRender in class org.apache.tapestry.AbstractComponent
protected void renderComponentDelegate(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IRequestCycle cycle)
writer - cycle - protected String constructFormNameForActionService(String actionId)
protected AjaxFormSupport newFormSupport(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IRequestCycle cycle)
AjaxFormSupport.
public void addEventHandler(org.apache.tapestry.form.FormEventType type,
String functionName)
addEventHandler in interface org.apache.tapestry.FormBehaviorpublic void trigger(org.apache.tapestry.IRequestCycle cycle)
trigger in interface org.apache.tapestry.IDirectpublic abstract org.apache.tapestry.web.WebResponse getResponse()
public abstract org.apache.tapestry.valid.IValidationDelegate getDelegate()
getDelegate in interface org.apache.tapestry.IFormpublic abstract org.apache.tapestry.IActionListener getListener()
public abstract org.apache.tapestry.IActionListener getSuccess()
public abstract org.apache.tapestry.IActionListener getCancel()
public abstract org.apache.tapestry.IActionListener getRefresh()
public abstract String getMethod()
public abstract boolean isStateful()
isStateful in interface org.apache.tapestry.IDirectpublic abstract String getScheme()
public abstract Integer getPort()
public void setEncodingType(String encodingType)
setEncodingType in interface org.apache.tapestry.FormBehavior
public void addHiddenValue(String name,
String value)
addHiddenValue in interface org.apache.tapestry.FormBehavior
public void addHiddenValue(String name,
String id,
String value)
addHiddenValue in interface org.apache.tapestry.FormBehavior
public void prerenderField(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IComponent field,
Location location)
prerenderField in interface org.apache.tapestry.FormBehavior
public boolean wasPrerendered(org.apache.tapestry.IMarkupWriter writer,
org.apache.tapestry.IComponent field)
wasPrerendered in interface org.apache.tapestry.FormBehaviorpublic void addDeferredRunnable(Runnable runnable)
addDeferredRunnable in interface org.apache.tapestry.FormBehaviorpublic abstract org.apache.tapestry.listener.ListenerInvoker getListenerInvoker()
public void registerForFocus(org.apache.tapestry.form.IFormComponent field,
int priority)
registerForFocus in interface org.apache.tapestry.FormBehaviorpublic String getEncodingType()
AjaxInvocationAjaxForm.
getEncodingType in interface AjaxInvocation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||