This content has been marked as final.
Show 2 replies
-
1. Re: variable as commandButton's action and xxx.page.xml
subaochen May 17, 2011 3:25 AM (in response to subaochen)I'm sorry, the last sentence means, why indirect call to MyBean.edit will bypass xxx.page.xml? thanks!
-
2. Re: variable as commandButton's action and xxx.page.xml
subaochen May 17, 2011 11:32 AM (in response to subaochen)I think it is because Seam Rule resolver can not understand EL expression #{bean[action]}, but only understand #{MyBean.edit}.
I have traced into Pages.java(org.jboss.seam.navigation):
`
public boolean navigate(FacesContext context, String actionExpression, String actionOutcomeValue)
{
String viewId = getViewId(context);
if (viewId!=null)
{
List<Page> stack = getPageStack(viewId);
for (int i=stack.size()-1; i>=0; i--)
{
Page page = stack.get(i);
Navigation navigation = page.getNavigations().get(actionExpression);
if (navigation==null)
{
navigation = page.getDefaultNavigation();
}
if ( navigation!=null && navigation.navigate(context, actionOutcomeValue) ) return true;
}
}
return false;
}`
but can not get why #{bean[action]} can not be understood? Any help? Thanks!