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:[EMAIL PROTECTED] 
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.


Reply via email to