You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Eurig Jones <eu...@gmail.com> on 2005/10/22 14:41:32 UTC

Help with a simple ActionListener on a CommandButton

Please if you can help me with this.. I'm on the verge or just giving 
up...I have a problem with the following and its driving me crazy!!

I'm getting a java.lang.NoSuchMethodException for RoomHandler.flipBoard. 
It seems to render the button correctly with its value. But I can't see 
why It can't find that method, because its definetly in the bean...

please see below

My view:

<f:view>
	<h:form id="room">
		
		<h:commandButton id="flipBoard" type="submit" 
value="#{room.flipBoardText}" actionListener="#{room.flipBoard}" />

		<h:messages />
	</h:form>
</f:view>



...and My Bean:

public class RoomHandler
{
	public RoomHandler()
	{
	}

	public String getFlipBoardText()
	{
         	String text = "";
         	if (getWhiteOnBottom())
         	{
			text = "White";
         	}
         	else
         	{
             		text = "Black";
         	}
         	text += " on bottom";
         	return text;
	}

	public void flipBoard(ActionEvent e)
	{
		System.out.println("Hello");
	}
}



My Facesconfig..

<managed-bean>
	<managed-bean-name>room</managed-bean-name>
	<managed-bean-class>uk.RoomHandler</managed-bean-class>
	<managed-bean-scope>session</managed-bean-scope>
</managed-bean>



Any ideas?

Re: getting the view tree in a string

Posted by Martin Marinschek <ma...@gmail.com>.
UIComponent.getClientId(context)

does the trick...

regards,

Martin

On 10/22/05, Eurig Jones <eu...@gmail.com> wrote:
> Another question!
>
> All components when outputting their id's output the components position
> in the view tree.
>
> I'm writing a custom component, so how do I retrieve my components
> current position in the tree as a string? Is there a method which does
> it, or do I have to iterate around something?
>
> Thanks
> Eurig
>


--

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German

getting the view tree in a string

Posted by Eurig Jones <eu...@gmail.com>.
Another question!

All components when outputting their id's output the components position 
in the view tree.

I'm writing a custom component, so how do I retrieve my components 
current position in the tree as a string? Is there a method which does 
it, or do I have to iterate around something?

Thanks
Eurig

Re: Help with a simple ActionListener on a CommandButton

Posted by Eurig Jones <eu...@gmail.com>.
Sorted! I think...

Must have been a problem with myEclipse not deploying the correct class. 
(i think anyway)

Re: Help with a simple ActionListener on a CommandButton

Posted by Eurig Jones <eu...@gmail.com>.
Oops...
I actualy renamed the method after my first post, to "add" in my code.

But to make things a bit clearer i pasted the stacktrace and did a 
search on "add" and replaced it with flipBoard to match up with my first 
post!!

I must've missed out that add. it should be "flipBoard". Sorry to 
confuse you :-(

No, the only thing thats in flipBoard is the System.out.


Guillermo Meyer wrote:
> In the stacktrace, the method that it's trying to get by reflection is
> "add". Have you got the full implementation code of "flipBoard"? or is it
> just:
> 	public void flipBoard(ActionEvent e)
> 	{
> 		System.out.println("Hello");
> 	}
> 
> Are you trying to use Value Binding with EL inside flipBoard?
> 
> Guillermo.
> 
> -----Original Message-----
> From: Eurig Jones [mailto:eurigjones@gmail.com] 
> Sent: Sábado, 22 de Octubre de 2005 11:48 a.m.
> To: MyFaces Discussion
> Subject: Re: Help with a simple ActionListener on a CommandButton
> 
> I've pasted the stacktrace at the bottom of this message.
> 
> I tried renaming my form but it didn't make any difference :-(
> 
> 
> Guillermo Meyer wrote:
> 
>>When does the exception appears? In the rendering phase or when submitting
>>the form? Can you "paste" the exception you have?
>>
>>Just in case; have you tried changing the <h:form id="room"> to
>><h:form id="formRoom"> ? Because both form id and bean id have the same
> 
> name
> 
>>"room" (I don’t think that could be the problem, but... who knows. ;). 
>>
>>Regards.
>>Guillermo.
> 
> 
> 22-Oct-2005 15:42:54 com.sun.faces.lifecycle.InvokeApplicationPhase execute
> SEVERE: add: uk.RoomHandler.flipBoard(javax.faces.event.ActionEvent)
> javax.faces.el.MethodNotFoundException: add: 
> uk.RoomHandler.flipBoard(javax.faces.event.ActionEvent)
> 	at
> com.sun.faces.el.MethodBindingImpl.method(MethodBindingImpl.java:206)
> 	at
> com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:124)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:305)
> 	at
> javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
> 	at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
> 	at 
> com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhas
> e.java:75)
> 	at
> com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
> 	at
> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
> 	at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:252)
> 	at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:173)
> 	at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:213)
> 	at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:178)
> 	at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
> )
> 	at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
> )
> 	at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :107)
> 	at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 	at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> 	at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> ction(Http11Protocol.java:744)
> 	at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
> a:527)
> 	at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
> rkerThread.java:80)
> 	at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:684)
> 	at java.lang.Thread.run(Thread.java:595)
> 22-Oct-2005 15:42:54 org.apache.catalina.core.StandardWrapperValve invoke
> SEVERE: Servlet.service() for servlet Faces Servlet threw exception
> javax.faces.el.MethodNotFoundException: add: 
> uk.RoomHandler.flipBoard(javax.faces.event.ActionEvent)
> 	at
> com.sun.faces.el.MethodBindingImpl.method(MethodBindingImpl.java:206)
> 	at
> com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:124)
> 	at javax.faces.component.UICommand.broadcast(UICommand.java:305)
> 	at
> javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
> 	at
> javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
> 	at 
> com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhas
> e.java:75)
> 	at
> com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
> 	at
> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
> 	at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:252)
> 	at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:173)
> 	at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:213)
> 	at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> va:178)
> 	at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
> )
> 	at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
> )
> 	at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> :107)
> 	at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 	at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> 	at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> ction(Http11Protocol.java:744)
> 	at 
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
> a:527)
> 	at 
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
> rkerThread.java:80)
> 	at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:684)
> 	at java.lang.Thread.run(Thread.java:595)
> 
> NOTA DE CONFIDENCIALIDAD
> Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias.
> 
> 

RE: Help with a simple ActionListener on a CommandButton

Posted by Guillermo Meyer <gm...@interbanking.com.ar>.
In the stacktrace, the method that it's trying to get by reflection is
"add". Have you got the full implementation code of "flipBoard"? or is it
just:
	public void flipBoard(ActionEvent e)
	{
		System.out.println("Hello");
	}

Are you trying to use Value Binding with EL inside flipBoard?

Guillermo.

-----Original Message-----
From: Eurig Jones [mailto:eurigjones@gmail.com] 
Sent: Sábado, 22 de Octubre de 2005 11:48 a.m.
To: MyFaces Discussion
Subject: Re: Help with a simple ActionListener on a CommandButton

I've pasted the stacktrace at the bottom of this message.

I tried renaming my form but it didn't make any difference :-(


Guillermo Meyer wrote:
> When does the exception appears? In the rendering phase or when submitting
> the form? Can you "paste" the exception you have?
> 
> Just in case; have you tried changing the <h:form id="room"> to
> <h:form id="formRoom"> ? Because both form id and bean id have the same
name
> "room" (I don’t think that could be the problem, but... who knows. ;). 
> 
> Regards.
> Guillermo.

22-Oct-2005 15:42:54 com.sun.faces.lifecycle.InvokeApplicationPhase execute
SEVERE: add: uk.RoomHandler.flipBoard(javax.faces.event.ActionEvent)
javax.faces.el.MethodNotFoundException: add: 
uk.RoomHandler.flipBoard(javax.faces.event.ActionEvent)
	at
com.sun.faces.el.MethodBindingImpl.method(MethodBindingImpl.java:206)
	at
com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:124)
	at javax.faces.component.UICommand.broadcast(UICommand.java:305)
	at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
	at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
	at 
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhas
e.java:75)
	at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
	at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
	at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:744)
	at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
	at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
	at java.lang.Thread.run(Thread.java:595)
22-Oct-2005 15:42:54 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.el.MethodNotFoundException: add: 
uk.RoomHandler.flipBoard(javax.faces.event.ActionEvent)
	at
com.sun.faces.el.MethodBindingImpl.method(MethodBindingImpl.java:206)
	at
com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:124)
	at javax.faces.component.UICommand.broadcast(UICommand.java:305)
	at
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
	at
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
	at 
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhas
e.java:75)
	at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
	at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
	at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:744)
	at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:527)
	at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:80)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:684)
	at java.lang.Thread.run(Thread.java:595)

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias.



Re: Help with a simple ActionListener on a CommandButton

Posted by Eurig Jones <eu...@gmail.com>.
I've pasted the stacktrace at the bottom of this message.

I tried renaming my form but it didn't make any difference :-(


Guillermo Meyer wrote:
> When does the exception appears? In the rendering phase or when submitting
> the form? Can you "paste" the exception you have?
> 
> Just in case; have you tried changing the <h:form id="room"> to
> <h:form id="formRoom"> ? Because both form id and bean id have the same name
> "room" (I don’t think that could be the problem, but... who knows. ;). 
> 
> Regards.
> Guillermo.

22-Oct-2005 15:42:54 com.sun.faces.lifecycle.InvokeApplicationPhase execute
SEVERE: add: uk.RoomHandler.flipBoard(javax.faces.event.ActionEvent)
javax.faces.el.MethodNotFoundException: add: 
uk.RoomHandler.flipBoard(javax.faces.event.ActionEvent)
	at com.sun.faces.el.MethodBindingImpl.method(MethodBindingImpl.java:206)
	at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:124)
	at javax.faces.component.UICommand.broadcast(UICommand.java:305)
	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
	at 
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
	at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:595)
22-Oct-2005 15:42:54 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.el.MethodNotFoundException: add: 
uk.RoomHandler.flipBoard(javax.faces.event.ActionEvent)
	at com.sun.faces.el.MethodBindingImpl.method(MethodBindingImpl.java:206)
	at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:124)
	at javax.faces.component.UICommand.broadcast(UICommand.java:305)
	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
	at 
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
	at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:595)

RE: Help with a simple ActionListener on a CommandButton

Posted by Guillermo Meyer <gm...@interbanking.com.ar>.
When does the exception appears? In the rendering phase or when submitting
the form? Can you "paste" the exception you have?

Just in case; have you tried changing the <h:form id="room"> to
<h:form id="formRoom"> ? Because both form id and bean id have the same name
"room" (I don’t think that could be the problem, but... who knows. ;). 

Regards.
Guillermo.

-----Original Message-----
From: Eurig Jones [mailto:eurigjones@gmail.com] 
Sent: Sábado, 22 de Octubre de 2005 09:42 a.m.
To: MyFaces Discussion
Subject: Help with a simple ActionListener on a CommandButton

Please if you can help me with this.. I'm on the verge or just giving 
up...I have a problem with the following and its driving me crazy!!

I'm getting a java.lang.NoSuchMethodException for RoomHandler.flipBoard. 
It seems to render the button correctly with its value. But I can't see 
why It can't find that method, because its definetly in the bean...

please see below

My view:

<f:view>
	<h:form id="room">
		
		<h:commandButton id="flipBoard" type="submit" 
value="#{room.flipBoardText}" actionListener="#{room.flipBoard}" />

		<h:messages />
	</h:form>
</f:view>



...and My Bean:

public class RoomHandler
{
	public RoomHandler()
	{
	}

	public String getFlipBoardText()
	{
         	String text = "";
         	if (getWhiteOnBottom())
         	{
			text = "White";
         	}
         	else
         	{
             		text = "Black";
         	}
         	text += " on bottom";
         	return text;
	}

	public void flipBoard(ActionEvent e)
	{
		System.out.println("Hello");
	}
}



My Facesconfig..

<managed-bean>
	<managed-bean-name>room</managed-bean-name>
	<managed-bean-class>uk.RoomHandler</managed-bean-class>
	<managed-bean-scope>session</managed-bean-scope>
</managed-bean>



Any ideas?


NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias.