[jboss-user] [JBoss jBPM] - event management

orochimaru19860000 do-not-reply at jboss.com
Fri Aug 31 06:15:56 EDT 2007


Hello everybody

Still with jbpm and its headackes :-)

I'm trying to add this time to add event listners to my control. but I m still didnt succeeded. here is a code that I tried.

the bean:

  | import javax.faces.event.ValueChangeListener;
  | public class test {
  | 
  | 	private String fname;
  | 	private String lname;
  | 	private String age;
  | 	
  | 	
  | 	
  | 	// fname property
  | 	public String getFname(){ return fname;}
  | 	public void setFname(String NewValue){ fname=NewValue;}
  | 	
  | //	 lname property
  | 	public String getLname(){ return lname;}
  | 	public void setLname(String NewValue){ lname=NewValue;}
  | // age property
  | 	public String getAge(){ return age;}
  | 	public void setAge(String NewValue){ age=NewValue;}
  | //event listener
  | 	public void method(ActionEvent evt) {
  | 	     setAge("twenty");
  | 	}
  | 	
  | 	
  | 	
  | public test() {
  | 		setFname("William");
  | 		setLname("Wallas");
  | 	}
  | 
  | }

the jsf file:

<!-- TASKFORM ROWS -->
  |       <jbpm:datacell>
  |         <f:facet name="header">
  |             <h:outputText value="first name"/>
  |         </f:facet>
  |       <h:inputText value="#{traitement.fname}"  />
  |       </jbpm:datacell>
  |       <jbpm:datacell>
  |         <f:facet name="header">
  |             <h:outputText value="last name"/>
  |         </f:facet>
  |       <h:inputText value="#{traitement.lname}" />
  | 
  | 
  | <!--here is the button where the listener is-->
  | 
  | <h:commandButton value="button1" action="#{traitement.methode}"></h:commandButton>
  |       </jbpm:datacell>
  |       <jbpm:datacell>
  |         <f:facet name="header">
  |             <h:outputText value="age"/>
  |         </f:facet>
  |       <h:inputText value="#{var['age']}" />
  |       </jbpm:datacell>

and the faces-config.xml:


<managed-bean>
  | <managed-bean-name>traitement</managed-bean-name>
  | <managed-bean-class>test</managed-bean-class>
  | <managed-bean-scope>session</managed-bean-scope>
  | </managed-bean>

When a deploy and try to load the page it makes an exception:
exception
  | 
  | javax.servlet.ServletException: Property 'methode' not found on type test
  | 	javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
  | 
  | 
is there anything wrong in the code? please help. 
thank you



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079916#4079916

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4079916



More information about the jboss-user mailing list