On Fri, 14 May 2010 00:43:02 -0300, Paul Stanton <p...@mapshed.com.au> wrote:

just further to that, i'm new to tapestry5 and haven't completed my reading on ajax etc,

but how would i listen for the 'something selected from list' event (for the autocomplete mixin), and do some asynchronous server side processing?

From the Autocomplete page: http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/mixins/Autocomplete.html

Just create a method

List<String> onProvideCompletionsFrom[component id](String string) {
        // return a list of string containing the suggestions.
}

I'm not sure I understood what you meant, but Tapestry handles all the AJAX plumbing for you automatically. Just handle the event triggered by the component, mixin or page. Writing a method to handle an AJAX request triggered by a Tapestry component, mixin or page event is done exactly in the same way non-AJAX events are handled.

Each component and mixin defines which events they triggers and how they process the value returned by the event handler method.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to