[
http://jira.jboss.com/jira/browse/JBSEAM-2365?page=comments#action_12391327 ]
koen handekyn commented on JBSEAM-2365:
---------------------------------------
an alternative which is maybe cleaner is to have a context variabele "view"
which is a seam generated object representing the view.
<page
view-id="/up/admin/*.xhtml"
conversation="%{view.name}Conversation"
<navigation
from-action="#{backingBean['remove']"
<end-conversation /
<redirect
view-id="/up/admin/%{view.name}List.xhtml" /
</navigation>
..
view having properties like
view.id (example /app/path/name.ext)
view.fullPath ( example
http://host/app/path/name.ext)
view.name ( example name )
> parametized page definitions
> -----------------------------
> Key: JBSEAM-2365
> URL:
http://jira.jboss.com/jira/browse/JBSEAM-2365
> Project: JBoss Seam
> Issue Type: Feature Request
> Affects Versions: 2.0.0.GA
> Reporter: koen handekyn
> Priority: Minor
> for typical administration pages one typicalle has a '
list + search ' with corresponding details page.
> for each of the details pages of all of the editable entities i'm repeating the
below
> <page
> view-id="/up/admin/portalConfiguration.xhtml"
> conversation="portalConfigurationConversation"
>
> <begin-conversation nested="true" /
> <navigation
from-action="#{backingBean['persist']"
>
<end-conversation /
> <redirect
view-id="/up/admin/portalConfigurationList.xhtml" /
>
</navigation
> <navigation
from-action="#{backingBean['update']}"
>
<end-conversation /
> <redirect
view-id="/up/admin/portalConfigurationList.xhtml" /
>
</navigation
> <navigation
from-action="#{backingBean['remove']"
>
<end-conversation /
> <redirect
view-id="/up/admin/portalConfigurationList.xhtml" /
>
</navigation
> </page
> as GK started of seam with DRY in mind, this repetion
should be avoidable.
> i propose a solution like the following
> <page
> view-id="/up/admin/*.xhtml"
> conversation="%{page}Conversation"
>
> <begin-conversation nested="true" /
> <navigation
from-action="#{backingBean['persist']"
>
<end-conversation /
> <redirect
view-id="/up/admin/%{page}List.xhtml" /
>
</navigation
> <navigation
from-action="#{backingBean['update']}"
>
<end-conversation /
> <redirect
view-id="/up/admin/%{page}List.xhtml" /
>
</navigation
> <navigation
from-action="#{backingBean['remove']"
>
<end-conversation /
> <redirect
view-id="/up/admin/%{page}List.xhtml" /
>
</navigation
> </page
> i.e.
> when a page matches " view-id="/up/admin/*.xhtml" " the * is
matched and assigned to a variable " page " that can be used below.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira