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?

Reply via email to