[ http://issues.apache.org/jira/browse/TAPESTRY-689?page=all ]
     
Howard M. Lewis Ship resolved TAPESTRY-689:
-------------------------------------------

    Resolution: Won't Fix
     Assign To: Howard M. Lewis Ship

Within the Tapestry community, there is a constant call for two things:
1) More features!
2) Backwards compatibility!

These two desires are at odds.

My goal going forward is to continue to shrink the amount of Tapestry API 
exposed to Tapestry developers.  

This can be summarized as "protected considered harmful"; adding protected 
methods is inviting unknown customizations by end developers into main line 
code.  This, in turn, makes it harder to evolve the framework without breaking 
backwards compatibility.

If you want to create a page-like service, please do so ... but we can't have 
the real page service's code held hostage to unknown requirements in the user 
community.  Sorry.

> PageService#getLink() overriding
> --------------------------------
>
>          Key: TAPESTRY-689
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-689
>      Project: Tapestry
>         Type: Wish
>   Components: Framework
>     Versions: 4.0
>     Reporter: Alexander Kundirenko
>     Assignee: Howard M. Lewis Ship

>
> getLink method cannot be overidden now because:
>  1) _linkFactory is private 
>  2) parameters map is local to this method
> Could you use TemplateMethod pattern to allow  users to add their custom 
> parameters (or modify existing).
> F.e. I want to restrict caching by adding timestamp to path:
>     public ILink getLink(IRequestCycle cycle, boolean post, Object parameter)
>     {
>         Defense.isAssignable(parameter, String.class, "parameter");
>         Map parameters = new HashMap();
>         parameters.put(ServiceConstants.SERVICE, getName());
>         parameters.put(ServiceConstants.PAGE, parameter);
>         addParameters(parameters); //ADDED METHOD CALL
>         
>         return _linkFactory.constructLink(cycle, post, parameters, true);
>     }
>         
>     //ADDED METHOD
>     protected void addParameters(Map parameters)
>     {
>         parameters.put("nocache", String.valueOf(System.currentTimeMillis()));
>     } 
> Thank you

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to