Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Dynamic form submitted third time in a row problem

    Hello again,
    These are the framework used and their versions:
    1. SmartGWT version: v9.1p_2014-06-14/LGPL Development Only (built 2014-06-14)
    2. GWT version: 2.6.0
    3. Mozilla Firefox version: 26.0

    I found a bug that it is very hard to be noticed. For example if I have a simple dynamic form and I click the submit button three times in a row the old values are the same as the new values. Keep in mind that before every click of the submit button I change the values from the form.

    How to reproduce the bug:
    Uncheck the checkbox and click save. Check the checkbox and click save. Again uncheck the checkbox and click save.
    In your IDE console you should see:

    ===========================
    Old value: true
    New value: false
    ===========================
    Old value: false
    New value: true
    ===========================
    Old value: false
    New value: false

    Please find attached the test case that reproduces the problems.
    Attached Files

    #2
    Hi guys,
    Have you found the problem yet? Because the test case I provided clearly shows that on a third submission of the form the values don't match.

    Comment


      #3
      This kind of thing could result from bad DataSource behavior (not returning expected values).

      Try creating a test case with a clientOnly DataSource, which is known to return correct values. If you see a similar problem there, it might actually be a bug and we'll take a look.

      Comment


        #4
        I have created a simple test case with a clientOnly DataSource and everything is working ok but this isn't my case. I have a custom DataSource that extends a smartgwt DataSource which is DSProtocol.CLIENTCUSTOM and DSDataFormat.CUSTOM and clientOnly is false. You can clearly see this in my previous test case.
        I don't think that I have a bad usage in my code because it is working ok 2 times and the 3rd time goes crazy. It must be something in your code that causes this strange behaviour. Please run my test case and have a look.

        Comment


          #5
          So again, you can create a problem that would only manifest on the third time if your DataSource returns incorrect data.

          Your DataSource should return the record-as-saved.

          Comment

          Working...
          X