1 Reply Latest reply on Feb 13, 2008 2:00 PM by Phil Wilson

    DropDownMenu and JSF Navigation

    Phil Wilson Apprentice

      Hello all,

      I am new to RichFaces. I am currently learning JSF and would like to use rich:dropDownMenu.

      I have a question for you. When I review the sample it shows this line.

      I want to use it to go to say the home page or search page...general menu bar for my test app.

      <rich:menuItem submitMode="ajax" value="New" action="#{ddmenu.doNew}">

      here is the ddmenu bean. The faces-config.xml does not show any navagion for this page or bean. How do I setup the navagion?

      Thanks
      Phil


      ----------------------------------------------------------------------------

      package org.richfaces.demo.ddmenu;

      public class Menu {
      private String current;

      public String getCurrent() {
      return this.current;
      }

      public void setCurrent(String current) {
      this.current = current;
      }

      public String doNew() {
      this.current="New";
      return null;
      }
      public String doOpen() {
      this.current="Open";
      return null;
      }
      public String doClose() {
      this.current="Close";
      return null;
      }
      public String doSaveText() {
      this.current="Save as Text File";
      return null;
      }
      public String doSavePDF() {
      this.current="Save as PDF File";
      return null;
      }
      public String doExit() {
      this.current="Exit";
      return null;
      }
      }

      --------------------------------------------------------------------
      faces-config.xml

      -----------------------------------------------------------------------

      <?xml version="1.0"?>
      <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
      "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
      <faces-config>
      <managed-bean>
      <managed-bean-name>bean</managed-bean-name>
      <managed-bean-class>org.richfaces.samples.dropdownmenu.Bean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
      <managed-bean>
      <managed-bean-name>skinBean</managed-bean-name>
      <managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
      <managed-bean-scope>session</managed-bean-scope>
      </managed-bean>
      </faces-config>