Details

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      This will wrap the buggy SeamNavigationHandler and informs the PartialViewContext about view-root changes:

      public class WrapNavigationHandler extends ConfigurableNavigationHandler {
      	private final NavigationHandler baseNavigationHandler;
      	public PortletNavigationHandler(NavigationHandler navigationHandler)
      	{
      		this.baseNavigationHandler = navigationHandler;
      	}
      	@Override
      	public void handleNavigation(FacesContext context, String fromAction, String outcome) {
      		String oldView = (context.getViewRoot() != null ? context.getViewRoot().getViewId() : "");
      
      		baseNavigationHandler.handleNavigation(context, fromAction, outcome);
      
      		if (!oldView.equals(context.getViewRoot().getViewId())) {
      			PartialViewContext pctx = context.getPartialViewContext();
      			if (!pctx.isRenderAll()) {
      				pctx.setRenderAll(true);
      			}
      		}
      
      	}
      ...
      }
      
      
      Show
      This will wrap the buggy SeamNavigationHandler and informs the PartialViewContext about view-root changes: public class WrapNavigationHandler extends ConfigurableNavigationHandler { private final NavigationHandler baseNavigationHandler; public PortletNavigationHandler(NavigationHandler navigationHandler) { this .baseNavigationHandler = navigationHandler; } @Override public void handleNavigation(FacesContext context, String fromAction, String outcome) { String oldView = (context.getViewRoot() != null ? context.getViewRoot().getViewId() : ""); baseNavigationHandler.handleNavigation(context, fromAction, outcome); if (!oldView.equals(context.getViewRoot().getViewId())) { PartialViewContext pctx = context.getPartialViewContext(); if (!pctx.isRenderAll()) { pctx.setRenderAll( true ); } } } ... }

      Description

      From javax.faces.application.NavigationHandler:

           * <p class="changed_added_2_0">This method must set the render targets
           * (used in partial rendering) to <code>render all </code>
           * invoking {@link javax.faces.context.PartialViewContext#setRenderAll})
           * if the view identifier has changed as the result of an application
           * action (to take into account <code>Ajax requests</code>).</p> 
      
          public abstract void handleNavigation(FacesContext context,
                                                String fromAction,
                                                String outcome);
      

      org.jboss.seam.jsf.SeamNavigationHandler doesn't implement it and therefore an ajax-view-change cannot be detected by PartialViewContext. Result: nothing will be rendered.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manaRH Marek Novotny
                  Reporter:
                  ivassile Ilia Vassilev
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: