On Wed, 14 Aug 2013 10:06:21 -0300, Tony Nelson <tnel...@starpoint.com> wrote:

componentResources.createEventLink("deleteContactLog", new Object[] {}).toURI()

Your mistake here is to think that the event context will come from the POST'ed data. It doesn't. It comes from the path in the URL.

You're passing an empty context to the createEventLink() method, so the URL it generates doesn't have any, so your onDeleteContactLog(ContactLog contactLog) (which has a parameter) won't be called. That's Tapestry behaving exactly as expected. When you're dealing with dynamic data being posted from JavaScript, use an event handler without parameters and use query parameters to pass the data:

void onDeleteContactLog() {
        String id = request.getParameter("id");
        ...
}

Of course, on the JavaScript side, you need to make the AJAX request containing a query parameter named "id" with the right value.

--
Thiago H. de Paula Figueiredo

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

Reply via email to