[
http://jira.jboss.com/jira/browse/JBSEAM-2748?page=comments#action_12403578 ]
Peter Boevink commented on JBSEAM-2748:
---------------------------------------
Workaround:
A workaround is available by adding all parameters present in UserEdit.page.xml to the
<s:link> tag e.g.:
<s:link view="UserEdit.xhtml">
<f:param name="userId"/>
<s:conversationPropagation type="nested" />
</s:link>
If UserEdit.xhtml however contained a lot of collections/lists (seperated in tab panels),
you might end up with a lot of params that are not relevant.
<s:link view="UserEdit.xhtml">
<f:param name="userId"/>
<f:param name="friendsOrder"/>
<f:param name="friendsFirstResult"/>
<f:param name="hobbyOrder"/>
<f:param name="hobbyFirstResult"/>
<s:conversationPropagation type="nested" />
</s:link>
IMHO a fix should concentrate on the following seam stuff:
org.jboss.seam.ui.component.UISeamCommandBase.getUrl()
===
if (viewId != null)
{
Map<String, Object> pageParameters =
Pages.instance().getStringValuesFromModel(context, viewId, usedParameters);
===
org.jboss.seam.navigation.Pages.getStringValuesFromModel(..., ..., ...)
===
else
{
value = pageParameter.getStringValueFromModel(facesContext);
}
===
org.jboss.seam.navigation.Param.getStringValueFromModel(...)
Object value = getValueExpression().getValue();
org.jboss.seam.core.Expressions.getValue()
{
return (T) toUnifiedValueExpression().getValue( getELContext() );
}
org.jboss.seam.el.EL.createELResolver()
===
new SeamELResolver()
===
org.jboss.seam.el.SeamELResolver.getValue(..., ..., ...)
===
if (base==null)
{
return resolveBase(context, property);
}
===
org.jboss.seam.el.SeamELResolver.resolveBase(..., ...)
===
Object result = init.getRootNamespace().getComponentInstance(key);
===
org.jboss.seam.Namespace.getComponentInstance(String key)
{
return getComponentInstance(key, true);
}
org.jboss.seam.Namespace.getComponentInstance(String key, boolean create)
{
return Component.getInstance( qualifyName(key), create );
}
where the boolean 'create' parameter causes the SeamObject to be created if it
does not exist yet.
s:link and s:button with a view parameter are preloading the view
-----------------------------------------------------------------
Key: JBSEAM-2748
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2748
Project: JBoss Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.1.0.A1
Environment: WinXP, jboss-4.2.2.GA, JDK1.5.*, jboss-seam-2.1.0.A1
Reporter: Peter Boevink
Create a JSF view (e.g. UserList.xhtml) which makes use of <s:link/> or
<s:button/> including the 'view' parameter e.g.:
<s:link view="UserEdit.xhtml"/>
UserList.seam should be rendered making use of a long-running conversation, e.g.:
UserList.page.xml:
<begin-conversation/>
The 'UserEdit.page.xml' references a bean by making use of:
<action execute="#{userHome.wire}"/>
Now visit the UserList.seam page which holds the s:link reference to UserEdit.xhtml.....
Don't click this s:link but open the debug.seam page to see what conversations exist
with their objects.
You''ll see a long running conversation (created by UserList.page.xml).
Surprisingly, this conversation contains a 'userHome' object that should not be
created before loading UserEdit.seam!
Expected behaviour is than a long running conversation without objects.
Making use of the <s:link/> tag with a typo in the 'view' parameter:
<s:link view="typo.xhtml"/>
Creates a long-running conversation without objects.
So it looks like the page referred by the view parameter is somehow rendered and the
beans referred by that page are pre-loaded in the currently active conversation scope.
This causes undesired behaviour when making use of nested conversation e.g.:
<s:link view="UserEdit.xhtml" propagation="nest"/>
or
<s:link view="UserEdit.xhtml">
<s:conversationPropagation type="nested" />
</s:link>
The beans referred by the UserEdit.seam page are now loaded in the parent conversation
instead of the nested one.
--
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