1 Reply Latest reply on Jun 11, 2007 10:36 AM by Pete Muir

    5.1.1.2. Navigation (Seam 1.2.1)

    Bradley Smith Master

      In section 5.1.1.2. Navigation in the Seam documentation, there is the following example:

      <page view-id="/editDocument.xhtml">
      
       <navigation from-action="#{documentEditor.update}">
       <rule if="#{documentEditor.errors.empty}">
       <redirect view-id="/viewDocument.xhtml"/>
       </rule>
       </navigation>
      
      </page>
      


      that is intended to help us avoid "(polluting) our DocumentEditor component with string-valued return values (the JSF outcomes)." I've looked through the samples and I can't find a concrete example of this navigation rule. Does this rule imply that a field named errors exists on the bean documentEditor? Furthermore, the Object represented by errors has a field named empty?

      Thanks,
      Brad Smith

        • 1. Re: 5.1.1.2. Navigation (Seam 1.2.1)
          Pete Muir Master

           

          "bsmithjj" wrote:
          Does this rule imply that a field named errors exists on the bean documentEditor? Furthermore, the Object represented by errors has a field named empty?


          Strictly yes, but we can infer that documentEditor has a property which is a Collection called errors (and Collection has the isEmpty() method).