[
https://issues.apache.org/jira/browse/TAPESTRY-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490669
]
Howard M. Lewis Ship commented on TAPESTRY-1421:
------------------------------------------------
This looks like a good idea; you can kind of get this today by declare a single
parameter of type Object[] ... then inject the TypeCoercer to get it to
strings, longs, dates, etc.
I don't think that Javassist currently lets us see if a parameter is a varargs
or not. There may be a way to get at the underlying raw bytecode to determine
this.
> Allow onActivate event handler method to receive dynamic parameters
> -------------------------------------------------------------------
>
> Key: TAPESTRY-1421
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1421
> Project: Tapestry
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.0
> Reporter: john
>
> Currently the onActivate method can have some parameter, and tapestry will
> automatically adapt to it and call the method with context strings.
> But for some pages, the parameters can be variant.
> I suggest ending String[] parameter for receive the rest context parameters,
> you can even use the Java 5's vararg for this.
> Say I have an onActivate method like this:
> public void onActivate(String name, int age, String... restParameters) {
> //do something
> }
> if I use "..../Page/john/30/p1/p2/p3" to call the page, the parameter
> received by onActivate method will be :{"john", 30, {"p1", "p2", "p3"}}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]