On Sat, 24 Nov 2012 17:23:33 -0200, membersound <[email protected]> wrote:

But my question still does not only apply to T-jquery, but Tapestry in
general. I could for example create a form and a link that says "fetch the value from specific input field" without submitting the form.

The link would be bound to any backing method, and within that backing
method I would like to extract what's inside the form's field, without
having hit the submit button.

So this is still Tapestry-related, and how could I solve this in
tapestry-context?

Overview (that's very probably very similar to what the jquery/binding mixin does, but I haven't read its source yet):

* Define an event name.
* Create an URL for it using ComponentResources.createEventLink()
* Create an event handler method for it.
* Pass the URL above to your JavaScript code. Use it to do an AJAX request using jQuery, Prototype, etc. The easier way to pass data to the event handler method is through request parameters. * To submit the data, just write a JavaScript event handler that picks the value and does the AJAX request above.

This is also the way of doing almost all kinds of custom AJAX stuff in Tapestry (except for the last item, which is specific to what you asked).

--
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to