@Override
public NavigationCase getNavigationCase(final FacesContext context, final String fromAction, final String outcome)
{
PrettyContext prettyContext = PrettyContext.getCurrentInstance(context);
PrettyConfig config = prettyContext.getConfig();
if ((outcome != null) && PrettyContext.PRETTY_PREFIX.equals(outcome))
{
String viewId = context.getViewRoot().getViewId();
NavigationCase navigationCase = parent.getNavigationCase(context, fromAction, viewId);
return navigationCase;
}
else if ((outcome != null) && outcome.startsWith(PrettyContext.PRETTY_PREFIX) && config.isMappingId(outcome))
{
/*
* FIXME this will not work with dynamic view IDs... figure out another solution
* (<rewrite-view>/faces/views/myview.xhtml</rewrite-view> ? For now. Do not support it.
*/
UrlMapping mapping = config.getMappingById(outcome);
String viewId = mapping.getViewId();
if (mapping.isDynaView())
{
viewId = dynaview.calculateDynaviewId(context, mapping);
}