method onFlowProcess of Wizard component not work

UI Components for JSF
Post Reply
NH0103
Posts: 1
Joined: 10 May 2010, 20:08

11 May 2010, 16:46

Hi all,
I'm using the current primefaces-1.0.1-SNAPSHOT with Apache Tomcat 6.0.18 and JSF 1.2. My problem is

Code: Select all

org.apache.jasper.el.JspMethodNotFoundException: /Wizard.jsp(32,17) '#{UserWizard.onFlowProcess}' Method not found: org.primefaces.examples.view.UserWizard@811e18.onFlowProcess()
Wizard works:

Code: Select all

 <h:form id="f" prependId="false">
                 <p:growl id="growl" showDetail="true"/>
                 <p:wizard id="Wizard" widgetVar="wiz" effect="#{UserWizard.effect}"  flowListener="#{UserWizard.onFlowProcess}"
            style="width:450px">
      
        <p:tab title="Personal Details" >

            <p:panel >


                <h:panelGrid columns="3" columnClasses="label, value" styleClass="grid" >
                   <h:outputText style="font-weight:bold;margin-left:70px" value="User Name:"/>
                            <h:inputText onblur="xuly_UserID()" style="width:200px" id="userID" value="#{UserWizard.userID}">
                                <rich:beanValidator/>
                            </h:inputText>
                            <span id="thongbao1" style="display:block;color:red"></span>

                            <h:outputText style="font-weight:bold;margin-left:70px" value="Password:"/>
                            <h:inputSecret  style="width:200px"  id="password" value="#{UserWizard.passWord}" >
                                <rich:beanValidator/>
                            </h:inputSecret>
                             <span id="thongbaoPas" style="display:none"></span>
                </h:panelGrid>
            </p:panel>
        </p:tab>

        <p:tab title="Adress Details">
            <p:panel >


                <h:panelGrid columns="3" columnClasses="label, value">
                    <h:outputText style="font-weight:bold;margin-left:70px" value="Full Name:"/>
                            <h:inputText style="width:200px"  id="fullname" value="#{UserWizard.fullname}" >
                                <rich:beanValidator/>
                            </h:inputText>
                            <span id="thongbaofname" style="display:none"></span>

                            <h:outputText style="font-weight:bold;margin-left:70px" value="Address:"/>
                            <h:inputText style="width:200px"  id="address" value="#{UserWizard.userAddress}" >
                                <rich:beanValidator/>
                            </h:inputText>
                              <span id="thongbaoAdd" style="display:none"></span>

                            <h:outputText style="font-weight:bold;margin-left:70px" value="Email:"/>
                            <h:inputText style="width:200px"  id="email" value="#{UserWizard.userEmail}" onblur="checkEmail(this)" >
                                <rich:beanValidator/>
                            </h:inputText>
                              <span id="thongbaoEMail" style="display:none"></span>

                            <h:outputText style="font-weight:bold;margin-left:70px" value="Phone:"/>
                            <h:inputText style="width:200px"  onblur="isNumber(this)" id="phone" value="#{UserWizard.userPhone}" >
                                <rich:beanValidator/>
                            </h:inputText>
                              <span id="thongbaoPhone" style="display:none"></span>

                            <h:outputText style="font-weight:bold;margin-left:70px" value="User Role:"/>
                            <h:selectOneMenu style="width:200px"  id="role" value="#{UserWizard.userRole}">
                                <f:selectItem itemValue="Employee" itemLabel="Employee"/>
                              <f:selectItem itemValue="Staff" itemLabel="Staff"/>
                              <f:selectItem itemValue="Driver" itemLabel="Driver"/>

                          </h:selectOneMenu>
                            <span id="thongbaoRole" style="display:none"></span>
                </h:panelGrid>
            </p:panel>
        </p:tab>



        <p:tab  title="Confirmation">
            <p:panel>


                <h:panelGrid id="confirmation" columns="4">
                   <h:outputText value="UserID: " />
                   <h:outputText value="#{UserWizard.userID}" styleClass="outputLabel"/>

                    <h:outputText value="Password: " />
                    <h:outputText value="#{UserWizard.passWord}" styleClass="outputLabel"/>

                    <h:outputText value="FullName: " />
                    <h:outputText value="#{UserWizard.fullname}" styleClass="outputLabel"/>>

                    <h:outputText value="Address: " />
                    <h:outputText value="#{UserWizard.userAddress}" styleClass="outputLabel"/>

                    <h:outputText value="Email: " />
                    <h:outputText value="#{UserWizard.userEmail}" styleClass="outputLabel"/>

                    <h:outputText value="Phone " />
                    <h:outputText value="#{UserWizard.userPhone}" styleClass="outputLabel"/>

                    <h:outputText value="Role " />
                    <h:outputText value="#{UserWizard.userRole}" styleClass="outputLabel"/>



                    <h:outputText />
                    <h:outputText />
                </h:panelGrid>

                  <p:commandButton value="Submit" actionListener="#{UserWizard.save}" update="growl" />

            </p:panel>
        </p:tab>

    </p:wizard>
    </h:form>
My Bean

Code: Select all

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.primefaces.examples.view;


import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import org.hibernate.validator.constraints.NotEmpty;
import javax.naming.*;
import org.jboss.logging.Logger;
import org.primefaces.event.FlowEvent;
import vehiclesystem.*;


/**
 *
 * @author Mr Ku
 */

public class UserWizard {

    /** Creates a new instance of UserWizard */
    public UserWizard() {
    }

    @NotEmpty(message="Not empty!!")
    private  String userID;

private  String passWord;
private  String fullname;
private  String userAddress;
private  String userEmail;
private  String userPhone;
private  String userRole;


private boolean skip;

    private String effect = "fade";

    private static Logger logger = Logger.getLogger(UserWizard.class.getName());

  public void save(ActionEvent actionEvent) {


        System.setProperty("java.naming.factory.initial",
                           "org.jnp.interfaces.NamingContextFactory");
        System.setProperty("java.naming.provider.url","localhost:1099");
        try{
            InitialContext jdniContext = new InitialContext();
            if(userRole.equals("Driver"))
            {
                TblUserInfoRemoteHome homeUse =(TblUserInfoRemoteHome)jdniContext.lookup("TblUserInfoRemote");
                TblUserInfoRemote dsUse = homeUse.create(userID, passWord, fullname, userAddress, userEmail, userPhone, userRole, "Free");

            }
            else
            {
                TblUserInfoRemoteHome homeUse =(TblUserInfoRemoteHome)jdniContext.lookup("TblUserInfoRemote");
                TblUserInfoRemote dsUse = homeUse.create(userID, passWord, fullname, userAddress, userEmail, userPhone, userRole, "N/A");
            }
             FacesContext context = FacesContext.getCurrentInstance();

        context.addMessage(null, new FacesMessage("Successful!!"));
        }
        catch(Exception ex)
        {
            FacesContext context = FacesContext.getCurrentInstance();

        context.addMessage(null, new FacesMessage("Error!!!"));
        }


       
        

    }

  public String getEffect() {
        return effect;
    }

    public void setEffect(String effect) {
        this.effect = effect;
    }

    public boolean isSkip() {
        return skip;
    }

    public void setSkip(boolean skip) {
        this.skip = skip;
    }

    public String onFlowProcess(FlowEvent event) {
        logger.info("Current wizard step:" + event.getOldStep());
        logger.info("Next step:" + event.getNewStep());

        if(skip)
            return "confirm";
        else
            return event.getNewStep();
    }
    /**
     * @return the userID
     */
    public String getUserID() {
        return userID;
    }

    /**
     * @param userID the userID to set
     */
    public void setUserID(String userID) {
        this.userID = userID;
    }

    /**
     * @return the passWord
     */
    public String getPassWord() {
        return passWord;
    }

    /**
     * @param passWord the passWord to set
     */
    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    /**
     * @return the fullname
     */
    public String getFullname() {
        return fullname;
    }

    /**
     * @param fullname the fullname to set
     */
    public void setFullname(String fullname) {
        this.fullname = fullname;
    }

    /**
     * @return the userAddress
     */
    public String getUserAddress() {
        return userAddress;
    }

    /**
     * @param userAddress the userAddress to set
     */
    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

    /**
     * @return the userEmail
     */
    public String getUserEmail() {
        return userEmail;
    }

    /**
     * @param userEmail the userEmail to set
     */
    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    /**
     * @return the userPhone
     */
    public String getUserPhone() {
        return userPhone;
    }

    /**
     * @param userPhone the userPhone to set
     */
    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    /**
     * @return the userRole
     */
    public String getUserRole() {
        return userRole;
    }

    /**
     * @param userRole the userRole to set
     */
    public void setUserRole(String userRole) {
        this.userRole = userRole;
    }
}
Thanks greet

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

13 May 2010, 00:52

Can you try with 1.0.1?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 59 guests