|
Hi, i have this code: <h:form id="form"> <h:outputText rendered="#{!bean.editable}" value="#{bean.firstName}" /> <br /> <h:outputText rendered="#{!bean.editable}" value="#{bean.lastName}" /> <h:inputText rendered="#{bean.editable}" value="#{bean.firstName}" id="firstName"/> <h:inputText rendered="#{bean.editable}" value="#{bean.lastName}" id="firstName"/> <t:div rendered="#{bean.owner && !bean.editable}"> <a4j:commandLink action="" reRender="form" value="Edit" id="editButton" ajaxSingle="true" /> </t:div> <t:div rendered="#{bean.owner && ben.editable}"> <a4j:commandLink value="Save" id="saveButton" action="" reRender="form" /> <a4j:commandLink value="Cancel" id="cancelButton" action="" reRender="form" immediate="true" /> </t:div> </h:form> This Form has two States Editable and Not Editable. I can Edit and Save this Form , but I have no idea how to realize a Cancel Link. At the moment, if i click cancel, the Output is like it should, the old value(also before editing). But if I click edit again, in the InputField is the value what I entered before click cancel. Any Ideas, what i can put in my bean? I tried to get the Data from Database and overwrite the InputFields, but then I get errors, because I'm using Lazyinitialization. I think the problem is A4J, because I havent the full request, my Input Field is still filled with old values. Like you see in my Code Im using A4J. And also Myfaces 1.1.5 with Tomahawk 1.1.6 Thx. i. A. |

