Em Thu, 02 Apr 2009 21:48:30 -0300, Jason Tan <jtan...@gmail.com> escreveu:

Sorry, should've been more specific -- the URLs that you POST and GET to
from within the javascript will usually have hardcoded URLs.

You was specific enough in your last message. You do not need to have hardcoded URLs. Take a look at http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained. It shows you some very nice examples of how to deal with Javascript in Tapestry. You can (and should) generate links using Tapestry and then use RenderSupport to write Javascript that uses them.

Thanks for the tip on printing parameter value vs. debugger, really good to know. I thought I was going crazy!!!

Tapestry does a lot of magic behind the scenes. ;)

Finally, I'm still baffed by the event method on page. If you have a simple page, Foo.java, with just this:

    void onActionFromHello()
    {
        log.debug("onActionFromHello");
    }

Please stop trial and error about action URLs. This will lead you nowhere.
You can learn a lot reading Tapestry sources. Take a look at the Autocomplete mixin, for example. It uses AJAX without hardcoding URLs.

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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

Reply via email to