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)" <ta...@jakarta.apache.org> on 2005/08/17 00:53:53 UTC

[jira] Updated: (TAPESTRY-568) Engine services should use getName() when constructing thier parameter maps so that they may be more easily subclassed and extended

     [ http://issues.apache.org/jira/browse/TAPESTRY-568?page=all ]

Howard M. Lewis Ship updated TAPESTRY-568:
------------------------------------------

    Summary: Engine services should use getName() when constructing thier parameter maps so that they may be more easily subclassed and extended  (was: Support for Services subclassing)

> Engine services should use getName() when constructing thier parameter maps so that they may be more easily subclassed and extended
> -----------------------------------------------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-568
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-568
>      Project: Tapestry
>         Type: Improvement
>   Components: Framework
>     Versions: 4.0
>     Reporter: Alexander Kundirenko
>     Assignee: Howard M. Lewis Ship

>
> I need to create my custom services based on AssetService and
> PageService, but they contain hardcoded service name.
> For example:
> =============== PageService.java =================
> public ILink getLink(IRequestCycle cycle, boolean post, Object parameter)
>     {
>         Defense.isAssignable(parameter, String.class, "parameter");
>         Map parameters = new HashMap();
>         parameters.put(ServiceConstants.SERVICE, Tapestry.PAGE_SERVICE);
>         parameters.put(ServiceConstants.PAGE, parameter);
>         return _linkFactory.constructLink(cycle, post, parameters, true);
>     }
> ===================================
> Could you change:
> Code:
> parameters.put(ServiceConstants.SERVICE, Tapestry.PAGE_SERVICE);
> to:
> Code:
> parameters.put(ServiceConstants.SERVICE, getName());
> And the same in other services? 
> If you do it will be possible just to override getName() to build
> custom service based on the standart one.

-- 
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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org