title: JSF - custom NavigationHandler outcome values invalid?
body: <p>I wrote myself a custom NavigationHandler very similar to following one but just using a stack to save the history: </p>
  
  <p><a href="http://jsfatwork.irian.at/book_de/custom_component.html#!idx:/custom_component.html:fig:backnavigationhandler-code" rel="nofollow">http://jsfatwork.irian.at/book_de/custom_component.html#!idx:/custom_component.html:fig:backnavigationhandler-code</a></p>
  
  <pre><code>public class HistoryNavigationHandler extends NavigationHandler
  {
      private final NavigationHandler navigationHandler;
  
      private final Stack&lt;String&gt; outcomes;
  
      public HistoryNavigationHandler(final NavigationHandler navigationHandler)
      {
          this.navigationHandler = navigationHandler;
          this.outcomes = new Stack&lt;String&gt;();
      }
  
      @Override
      public void handleNavigation(final FacesContext context, final String fromAction, final String outcome)
      {
          if (outcome != null)
          {
              if (outcome.equals("back"))
              {
                  final String lastViewId = this.outcomes.pop();
  
                  final ViewHandler viewHandler = context.getApplication().getViewHandler();
                  final UIViewRoot viewRoot = viewHandler.createView(context, lastViewId);
                  context.setViewRoot(viewRoot);
                  context.renderResponse();
  
                  return;
              }
              else
              {
                  this.outcomes.push(context.getViewRoot().getViewId());
              }
          }
          this.navigationHandler.handleNavigation(context, fromAction, outcome);
      }
  }
  </code></pre>
  
  <p>Registering this one in the faces-config.xml:</p>
  
  <pre><code>&lt;navigation-handler&gt;
      package.HistoryNavigationHandler
  &lt;/navigation-handler&gt;
  </code></pre>
  
  <p>Results in following log warning and a message where a previously working link was present:</p>
  
  <pre><code>Warning: jsf.outcome.target.invalid.navigationhandler.type
  
  Something like: this link is disabled because a navigation case could not be matched
  </code></pre>
  
  <p>What is the problem?</p>