Announcement

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

    Message Error

    Situation following. Is DataSource with id - primaryKey. I add in ListGrid new record, I shall strike I delete it, there is a message.

    Record:{Id:348},is no longer present in this List.
    Clearning edit values for this record.

    #2
    Hello HySerg,

    You could get this by manually deleting a record that the user had edited. You can avoid it by calling discardEdits to manually remove the edits the user has made to the record before removing it from the dataset.

    Comment


      #3
      WARN Statement in a Grid with canRemoveRecords & setAutoSaveEdits

      Version: v8.3p_2013-02-09/PowerEdition Deployment (built 2013-02-09)
      Firefox: 18.0.1

      I'm having a somewhat similar issue to the original poster.

      I create a list grid and set the following settings:
      Code:
      listGrid.setCanRemoveRecords(true);
      listGrid.setAutoSaveRecords(false);
      This shows the nice "delete" icons next to records. When I click the delete icon, I get the nice "undo" icon next to the record.

      Since the records are not "deleted", I need to perform an action to write these deletions as well as any other record local cell edits back to the server.

      I have a nice UI Toolbar with a Save button. When the user clicks the save button, I call the following code:

      Code:
      listGrid.saveAllEdits();
      Unfortunately, I get this WARN/ERROR message:
      Code:
      16:37:04.080 [ERROR] [App] 16:37:04.079:XRP4:WARN:ListGrid:isc_GridLayoutBase_1_3:Record:{id: 47}, is no longer present in this List.<br>Clearing edit values for this record.
      com.smartgwt.client.core.JsObject$SGWT_WARN: 16:37:04.079:XRP4:WARN:ListGrid:isc_GridLayoutBase_1_3:Record:{id: 47}, is no longer present in this List.<br>Clearing edit values for this record.
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
          at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
          at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
          at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
          at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
          at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
          at java.lang.Thread.run(Thread.java:680)
      I'm following the example here: http://www.smartclient.com/smartgwte...e/#mass_update

      That example, however, only does mass updates on add. I'm trying to do it for add, edit, or delete.

      I believe that sample, if setCanRemoveRecords(true) was added as a setting on the listgrid, would show this same WARN message.

      Is this a known issue?

      Comment


        #4
        As a follow up, here are the conditions where I'm seeing that WARN/ERROR message:

        setCanRemoveRecords(false)
        setAutoSaveEdits(true)
        Remove Record => NO ERROR

        setCanRemoveRecords(true)
        setAutoSaveEdits(true)
        Remove Record => NO ERROR

        setCanRemoveRecords(true)
        setAutoSaveEdits(false)
        Remove Record => ERROR MSG

        Comment


          #5
          Other than the warning message, is the functionality behaving as documented ("remove" operations are included in the queue of operations when you saveAllEdits())?

          If it's behaving as documented, maybe the problem is cache sync - a bad response from your server that does not include the primary keys of the removed record, as is expected?

          Comment


            #6
            Originally posted by Isomorphic View Post
            Other than the warning message, is the functionality behaving as documented ("remove" operations are included in the queue of operations when you saveAllEdits())?

            If it's behaving as documented, maybe the problem is cache sync - a bad response from your server that does not include the primary keys of the removed record, as is expected?
            The records remove as expected...operationally everything is fine. I just get that WARN message for every record removed.

            I can check the server response, however, I'm not doing any custom DMI or backend server logic (using SQLDataSources and ds.xml files).

            I'm hoping when I have a free moment to grab the online sample, tweak it, and see if it throws the WARN message as well.

            Comment

            Working...
            X