Announcement Announcement Module
Collapse
No announcement yet.
what is the meaning of Form.revert()? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • what is the meaning of Form.revert()?

    what is the meaning of Form.revert()?

  • #2
    It tells the form model to revert all of the value models to their original values. So, if you're using buffered value models and the user has changed some of the values, but not committed the form, then the revert() method discards the users changes and reinstates the original model values.

    Larry.

    Comment


    • #3
      Little Example

      lstreepy already gives you a good explanation. Here a little example:

      Open a Form with a BusinessObject Customer:
      Id: 1
      Name: Demo
      State: Austria
      Phone: 123456

      Modification:
      State: France

      When you modify these values in the textfields the form model still has the old values. When you commit the form the values of the formcomponents are write to the form model. When you revert the form, the modified values are overwritten with the old values.

      When commit --> State has value France
      When revert --> State has value Austria

      hope this helps
      markus

      Comment


      • #4
        So, if you're using buffered value models and the user has changed some of the values, but not committed the form, then the revert() method discards the users changes and reinstates the original model values.
        Just a clarification - the revert fuctionality works for both buffered and unbuffered forms.

        Ollie

        Comment


        • #5
          Originally posted by oliverhutchison
          Just a clarification - the revert fuctionality works for both buffered and unbuffered forms.
          Ollie
          If I change values in a component of a form , like changing text in a TextField, does the buffer values changing at the same time?

          Thanks all!

          Comment


          • #6
            Yes, the commit policy is "as you type" so as you change the text in the component, the buffered value (or the model if unbuffered) is being updated with the component text.

            Larry.

            Comment


            • #7
              thank Larry

              Comment

              Working...
              X