Problem with JSF rendered
Hi,
I have strange problem in my JSF project. When i use rendered along with <h:commandButton> it is not invoking method specified in action attribute. In following code
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<h:commandButton
action="#{myBean.updateMyData}"
value="EditButton"
rendered ="#{myBean.buttonClicked == 'edit'}">
</h:commandButton>
<h:commandButton
action="#{myBean.saveMyData}"
value="SaveButton"
rendered ="#{myBean.buttonClicked == 'save'}">
</h:commandButton>
It is showing proper buttons on jsp pages. i.e. if value of "myBean.buttonClicked" = save , it shows save button else it shows edit button.
But problem is when i click the button, it is not calling any method.ie. neither "saveMyData" nor "updateMyData".
Now, if i make use of <t:saveState> of myfaces, it works fine. Following is code after inserting which it works fine.
<%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk"%>
<t:saveState value="#{myBean}"/>
Please help me out on this. I dont want to save the state and i want rendered to work fine. Any pointers will be really helpful to me.
Thanks,
Vishal

