You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org> on 2008/02/28 23:53:51 UTC

[jira] Closed: (TAPESTRY-1421) Allow onActivate event handler method to receive dynamic parameters

     [ https://issues.apache.org/jira/browse/TAPESTRY-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-1421.
------------------------------------------

    Resolution: Won't Fix
      Assignee: Howard M. Lewis Ship

You can now receive your parameters as an EventContext, which can a) be queried for length and b) automatically type coerce URL strings to server-side objects.  

> 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: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.0
>            Reporter: john
>            Assignee: Howard M. Lewis Ship
>
> 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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org