7 Replies Latest reply on Apr 24, 2007 2:58 AM by baz

    seam-gen: behaviour of an generated app

    baz

      Hello,
      I do have some problems with a seam-gen (Seam 1.2.1GA) generated app.
      My setup:
      1. seam setup
      2. seam new-project
      3. seam generate-entiities
      Now i hae a complete app which i can deploy to jboss.
      For simplicity i will reference to an entity called Car

      Start the application and navigate to view-id 'CarList.xhtml'Press the 'select' Link for a car.
      You are forwarded to Car.xhtml.
      Now press the 'edit' button. You are on carEdit Change some attributes and press 'Done'.
      You are now back to Car.xhtml and all changes where persisted to database. This is not what i want. The Done button should cancel all changes.

      I edited CarEdit.page.xml and added the attribute flush-mode="MANUAL" to the begin-converstaion tag.

      Now i have the desired behaviour. But a little inconsistency remains.
      On CarEdit.xhtml the 'Save' button does what it should do. Perfect.
      The 'Done' Button forwards to Car.xhtml but all changes done on the CarEdit.xhtml page are shown here. A browser reload of the Car.xhtml page drops all changes and shows the page as it was before the changes on CarEdit..
      Or do this:
      On CarEdit make changes, reload the page through the browser reload button. All changes that you have made are still shown.
      Now press the 'Done' button, and voila you get the expected 'old' values back.

      How can i achieve my requirement that pressing the 'Done' button will show directly the old values. (All changes are thrown away)
      Any ideas about this?
      I do have searched this forum and the seam jira but i have not found anything about this. If i overlooked something a pointer to the right direction is welcomed.
      Ciao,
      Carsten