On Fri, 14 Jan 2011 14:27:12 -0200, Adam Zimowski <zimowsk...@gmail.com> wrote:

Hi

Hi!

My question is, how should I approach this? Currently, the price
button invokes a JS call. So how can I call actionlink URL from a
JavaScript?

Every event (ActionLink triggers events) has an URL. To get it, create a ComponentResources field and add the @Inject annotation to it, then use its Link createEventLink(String eventType, Object... context) method. It returns a Link. Use its toAbsoluteURI() to get the URL itself then pass it to your JavaScript, must probably by using RenderSupport.addScript() (you'll need to @Inject it too). This page has some RenderSupport examples: http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained. Tapestry JumpStart (http://jumpstart.doublenegative.com.au/) should have some examples too.

--
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