I personally prefer generating an eventlink and adding the parameters
the normal tapestry way. Then Tapestry will take care of everything
for you. So still only generate one Link
(pageOrComponentUrl:eventName) and append the parameters server side
and pass them using RenderSupport.addScript() or append the params
client side.

eg: pageOrComponentUrl:eventName/StringVar1/LongVar2

on your page:

@OnEvent(value = "eventName")
private Object handleEvent(String var1, Long var2) {
    ...do stuff and return JSON/Block/null/Page class/Link/String url...
}

or if the params can be of many different configurations

@OnEvent(value = "eventName")
private Object handleEvent(EventContext context) {
    ...do stuff and return JSON/Block/null/Page class/Link/String url...
}

Cheers,
Joost

On Sun, May 24, 2009 at 9:19 AM, Markus Joschko
<markus.josc...@gmail.com> wrote:
> Thanks, never thought about "normal parameters".
> I then probably need to do the coercion&stuff on my own. I guess there
> is a service I can use for that. However it still feels like hack.
>
>
> On Sat, May 23, 2009 at 10:06 PM, Thiago H. de Paula Figueiredo
> <thiag...@gmail.com> wrote:
>> Em Sat, 23 May 2009 16:17:11 -0300, Markus Joschko
>> <markus.josc...@gmail.com> escreveu:
>>
>>> But that does not scale very well.
>>> Only 10 draggables and 10 droppables would result into 100 potential
>>> links that I need to render "just in case".
>>> And if you have to deal with 100 draggables this gets really ugly.
>>
>> So generate a single link that will have query parameters on them
>> (/page/event?x=1&y=2). ;) To get the parameters, @Inject the Request
>> service.
>>
>> --
>> 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
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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

Reply via email to