You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org> on 2008/02/08 16:05:12 UTC

[jira] Updated: (TAPESTRY-1895) Add possibiliti to generate stateless links Page and External links.

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

Jesse Kuhnert updated TAPESTRY-1895:
------------------------------------

    Fix Version/s:     (was: 4.1.5)
                   4.1.6

> Add possibiliti to generate stateless links Page and External links.
> --------------------------------------------------------------------
>
>                 Key: TAPESTRY-1895
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1895
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Core Components
>    Affects Versions: 4.1.3
>            Reporter: Alexander Gavrilov
>             Fix For: 4.1.6
>
>
> For now External and Page service always generated statefull links. 
> In my application i generate links to send to the users, and those links includes all "client" persistent state of pages, and encodes session ID. This state ans session ID is not required for users when they access page first time. 
> Whe can add parameter statfull to the ExternalServiceParameter class, and add new class PageServiceParameter with page name and statefull attributes. In PageService we can check what the type of passed parameter, and if it is PageService, use it if not use the default behaviour. The defined "statefull" parameter whe can bypass to the _linkFactory.constructLink method. 
> for ExternalService:
>     ExternalServiceParameter esp = (ExternalServiceParameter) parameter;
>     Map parameters = new HashMap();
>     parameters.put(ServiceConstants.PAGE, esp.getPageName());
>     parameters.put(ServiceConstants.PARAMETER, esp.getServiceParameters());
>     return _linkFactory.constructLink(this, post, parameters, esp.isStatefull());
> for PageService:
>     Map parameters = new HashMap();
>     final PageServiceParameter psp = parameter instanceof PageServiceParameter ? (PageServiceParameter)parameter : null;
>     parameters.put(ServiceConstants.PAGE, psp != null ? psp.getPage() : parameter);
>     return _linkFactory.constructLink(this, post, parameters, psp != null ? psp.isStatefull() : true);

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