Announcement

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

    ListGrid Multiple Update returning same same error message param

    Hi,

    I am using SMartGWT version "v9.0p_2013-07-24/PowerEdition Deployment" .

    I am facing one issue with List Grid Multiple Record Update. I am getting repeated response Error Message Parameters for Second multiple record Update.

    Step to reproduce the Issue:

    1. Update more than 1 record say 2 records. It should return 2 dsrespose with error message & error Message Param. As In my case say return Error Message Param should be "Param1" & "Param2". It is returning the expected Parameter "Param1" & "Param2".

    2. Now again edit 2 record. Can edit same record which we have edited previously. Or Different Records. This time also it return 2 dsresponse, but with Repeated Error Message Param "Param1" & "Param1".

    IT SHOULD BE "Param1" & "Param2" Might be for second edit it is returning same DSResponse.

    After this If we keep editing the multiple records then response get added into current count with what ever the response we got before.

    Please let me know the same.

    Thanks,
    DSingh
    Last edited by DSingh; 30 Sep 2013, 04:08.

    #2
    Sorry, we don't follow your description.

    Where are you setting these error messages?

    Where are they being shown?

    Comment


      #3
      We are taking as success message with Parameter just like
      Employee No {0} got updated. here {0} is param which we set in response. All the Error Message and Parameter is getting set in DMI.

      With the All error message and param we are populating messages, after operation perform.

      Regards,
      DSingh

      Comment


        #4
        That didn't help at all - could you answer the questions we asked?

        Comment


          #5
          Where are you setting these error messages?
          DSingh]] Response Error Message and Param being set in DMI

          Where are they being shown?
          DSingh]] It is shown in UI side as Popups. Once List Update Operation successfully.

          After saveAllEdit I have handler.

          ListGrid().addEditCompleteHandler AND ListGrid().addEditFailedHandler
          Last edited by DSingh; 1 Oct 2013, 07:52.

          Comment


            #6
            By design, the default error handling shows the first error message only, and not a concatenated list of all error messages.

            If you want to override this behavior, you can do so via adding a HandleErrorCallback to RPCManager.

            Still no idea what you mean about "Param"s. For clarity, please refer to actual SmartGWT APIs in the future.

            Comment


              #7
              I think you did not get my problem.

              Let say I have Edited List grid. I am editing records having id 121 and 122.

              In DMI side I do return updated record with Success Message in Response. For 2 updates I will be having 2 Response.

              For first update for 2 records I am getting 2 response with Expected Error Message.
              Say for First 2 update I am getting

              1. "Record Updated for Id 121"
              2. "Record Updated for Id 122"

              In UI Side I do have ListGrid().addEditCompleteHandler AND ListGrid().addEditFailedHandler In which

              I use to get all response message and display on UI.

              Second Time I update again 2 records having id 123 and 124.

              Now In DMI I am getting expected response count that is two response for 2 updates.
              Now in UI Side at addEditCompleteHandler() it is returning 2 response with message

              1. "Record Updated for Id 123"
              2. "Record Updated for Id 123"


              Actually It should be

              1. "Record Updated for Id 123"
              2. "Record Updated for Id 124"

              And if i edit 3 records next time then addEditCompleteHandler() get called more than 3 times. and so on....

              This is what I am doing to get message from response...

              JavaScriptObject jso = _getMessageElements(resp.getJsObj());
              Object[] temp = JSOHelper.convertToArray(jso);

              My concern is if There is problem with my code then It should not come proper dsresponse in 1st update too.

              Regards,
              DSingh

              Comment


                #8
                Please post a thorough explanation of the problem, similar to what you just posted, when you *start* a thread. There is no way anyone could have figured out what you meant from your first few posts.

                As far as this possibly being due to a framework issue, just check the response you are sending using the RPC tab. If you see that your response contains the same message for the two dsResponses, then you have an issue in your server code.

                Comment


                  #9
                  HI,

                  For 2 dsresponse I am getting different messages in RPC tab For Your reference please find attached response.

                  Regards,
                  DSingh
                  Attached Files

                  Comment


                    #10
                    It looks like you are adding errors to the dsResponse object yourself via dsResponse.setProperty(), because if you called setFailure() or similar APIs, it wouldn't look like you've shown.

                    This means you have your own client-side code processing these errors, not SmartGWT. So look to your own code for a problem.

                    Comment


                      #11
                      Yes I am processing what ever is in dsresponse. What I get in UI Call back DSResponse thats what it matter. dsresponse is not getting as expected or what i set in multiple dsresponse. With first Operation for multiple records getting message as expected after that for 2nd, 3rd its getting mess.

                      In simple way from second Operation for multiple records it is not returning dsresponse properly. TO ui in callback. You can check this at your end.


                      Regards,
                      DSingh

                      Comment


                        #12
                        Sorry, this doesn't make sense as a bug report against the framework, since we don't even process this custom property of yours, and if we were somehow reusing the same dsResponse twice this would have very obvious consequences (hundreds of automated tests would break).

                        If you truly think this is a framework bug, try to set up a minimal, standalone test case demonstrating the issue. In the process of attempting this, you will most likely discover the bug in your code.

                        Comment


                          #13
                          Please find attached test case. Try to update multiple records multiple time...you could see Response in Below message window.

                          I am using "v9.0p_2013-07-24/PowerEdition Deployment"

                          In this issues on second update DSResponse is coming multiple times Or more than expected times

                          Regards,
                          DSingh
                          Attached Files

                          Comment


                            #14
                            Invalid test case, missing several files that would be required to run it.

                            Just to avoid more turnarounds: don't just start posting more files that are needed. Test cases must be minimal, so reduce the test case until it runs in a standard SDK.

                            Comment


                              #15
                              Hi,

                              Please find attached Project Files. We are using SmartGWT Version "v9.0p_2013-07-24/PowerEdition Deployment".

                              Scenario to reproduce the Issue.

                              1. Update more than 1 record from Employee Grid and click Save.
                              2. See the output in Messages Display Area. Now see messages are coming properly as expected for updated records. (Number of response is equal to number of updated records).
                              3. Now again edit more than 1 record from Employee Grid and Click Save.
                              4. If request post for 2 record update then will get multiple response. like for 2 record getting 4 response.

                              Complete code is attached with this post.

                              Other files I am uploading in next post.

                              Please let me know if you need any input from my side.

                              Regards,
                              DSingh
                              Attached Files
                              Last edited by DSingh; 13 Dec 2013, 05:43.

                              Comment

                              Working...
                              X