org.apache.tapestry
Interface IDynamicInvoker

All Known Subinterfaces:
IDirect, IForm
All Known Implementing Classes:
Autocompleter, DirectLink, Form, Go, ImageSubmit, InlineEditBox, LinkSubmit, ShowTemplate, Submit, Suggest

public interface IDynamicInvoker

Represents "something" that can cause dynamic XHR/JSON requests to be executed as a result of whatever actions the thing that it is attached to normally does.

This interface is more commonly implemented by components like DirectLink or to decorate existing functionality.

Author:
jkuhnert

Method Summary
 List getUpdateComponents()
          If set, will be used to update/refresh portions of a response during XHR requests.
 boolean isAsync()
          Used to specify whether or not the result of this invocation should be returned asynchronously or use normal browser page reload semantics.
 boolean isJson()
          Used to specify that the return invocation of the response created should be in the "http://json.org" format.
 

Method Detail

getUpdateComponents

List getUpdateComponents()
If set, will be used to update/refresh portions of a response during XHR requests.

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"
 

Returns:
The list of components to update, if any.

isAsync

boolean isAsync()
Used to specify whether or not the result of this invocation should be returned asynchronously or use normal browser page reload semantics.

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 isJson(). Without setting the getUpdateComponents() parameter this parameter is pretty useless.

Returns:
True if invocation should be processed asynchronously.
See Also:
isJson()

isJson

boolean isJson()
Used to specify that the return invocation of the response created should be in the "http://json.org" format. Without setting the getUpdateComponents() parameter this parameter is pretty useless.

Returns:
True if response should be encoded using JSON semantics.
See Also:
org.apache.tapestry.IJSONRender}


Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.