1 2 Previous Next 17 Replies Latest reply on Jan 22, 2007 10:32 PM by holgerprause Go to original post
      • 15. Re: access faces-config.xml in a java bean

        Ah ok :-)

        Its also in the api if one can read ^^

        @Name(value="org.jboss.seam.core.pages")
        


        and again thx very much, everything is working now :-)

        Bye,
        Holger

        • 16. Re: access faces-config.xml in a java bean

          Oh i got 1 final question, i can get access to the rule i need to know,
          but i need to get the target viewId <redirect view-id="/welcome.xhtml"/>

          How can i archieve this (i am stuck at this point)

          <rule if-outcome="loginsuccess">
           <redirect view-id="/welcome.xhtml"/>
          </rule>
          



          java code

          Page page = pages.getPage("/index.xhtml");
          Navigation nav = page.getDefaultNavigation();
          for(Rule tmpRule: nav.getRules()) {
           log.info("tmp rule: "+tmpRule.getOutcomeValue());
           for(Output tmpOutput: tmpRule.getOutputs()) {
           log.info(tmpOutput.getValue());
           }
          }
          


          • 17. Re: access faces-config.xml in a java bean

            Hello i noticed a nice feature in the rule element u can specify out tag, that would be just perfect!

            I only got 1 problem how can i specify a constant string expression to be outjected: like

            <rule if-outcome="loginsuccess">
             <out name="detailViewId" value="/details.xhtml" />
             <render view-id="/welcome.xhtml"/>
             </rule>
            


            if i put that code in side i got the error message "Parsed Expression of unexpected type java.lang.String"

            Thx,


            Holger


            1 2 Previous Next