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

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

    Resolution: Invalid
      Assignee: Howard M. Lewis Ship

That looks like another framework, not Tapestry. With that approach, you add a 
lot of code and lose out on a lot of Tapestry features in terms of data type 
coercion and built-in smarts about caching.

> Initializing component parameters using code (not via annotation).
> ------------------------------------------------------------------
>
>                 Key: TAPESTRY-1149
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1149
>             Project: Tapestry
>          Issue Type: Improvement
>    Affects Versions: 5.0
>            Reporter: john
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
>
> In tapestry 5, most things are done in codes and I like that approach. So 
> naturally I want to pass parameters to components in codes.
> The parameters must be passed using attributes in html or in code like this:
> @ComponentClass
> public class Start {
>       private String name = "john";
>       @Component(parameters={"value=name"})
>       private Echo echo;
> }
> I'd like to set parameters in code like following:
> @ComponentClass
> public class Start {
>       private String name = "john";
>       @Component
>       private Echo echo;
>       @SetupRender // or BeforeRender
>       public void initComponents() {
>               echo.setValue(name);
>       }
> }
> It's more swing alike and has all the benefits of typed using like 
> refactoring and static type check.
> Currently, Tapestry will complain that the required parameters not filled. I 
> think move the required parameter checking AFTER the @SetupRender will work. 
> But another issue is that it seems that you can't set parameter value using 
> method like setValue.
> BTW, Wicket also uses this style of component parameter setting as I know.

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

Reply via email to