Announcement

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

    null integer value in listgrid not allowed when grouped

    Take sample isomorphic/system/reference/SmartClient_Explorer.html#editByRow

    1. Edit one of the Population values by removing the data.
    2. Click outside of the row. The value is now empty.
    3. Now group the table by "Continent". Remove one of the population values and click outside the row. The value is now returned to the old value.

    Please confirm which is the correct behaviour. Thanks.

    #2
    I've tested in 8.3 and 9.0, all browsers

    Comment


      #3
      Thanks for the notification. We've made a change to address this issue in both branches.
      Please try the next nightly build (dated Nov 16 or above)

      Regards
      Isomorphic Software

      Comment


        #4
        Thanks - but what is the proper behaviour? To accept the null value I hope!

        Comment


          #5
          Yes!
          The fact that it's losing your edit is a bug.
          If the field was marked as required, then the edit would be rejected, but you'd also see a validation error icon next to it. Silently reverting to the previous value while the grid is grouped was simply broken behavior.

          Comment


            #6
            The standalone case I provided for this issue now works but I am still having problems with my testcase. I've narrowed it down to my displayField. When the value is modified then I click outside of the row, I have a blur function on the field that calls updateData as such:

            Code:
             var sessionParams = $wnd.cwSessionId == null?{willHandleError:false}:{willHandleError:false, params:{sessionId:$wnd.cwSessionId}};
            
            item.grid.updateData(record, function(){
            com_conceptwave_gwt_client_Velocity_endActionChain__I();
            }
            , sessionParams);
            Using the jsconsole, I can see the response shows the proper displayField data but the listgrid still reverts to the old value.

            Using firebug, I add a breakpoint in the callback function I provided in updateData, and the argument[2] which contains the record returned from the server has the proper value as well.

            Is there anywhere else I can check to try and determine what is re-setting the display value to the old one? When I remove the displayField property, it works fine.

            Comment


              #7
              We can't tell from your description alone what is going wrong.

              It sounds like your scenario is that you have a grouped, editable grid, being edited by the user, and for some field you have a specified display field.
              When the user takes focus from the edit-item, you explicitly save out changes via an 'updateData()' call, which successfully updates the data on the server, and the DSResponse shows the updated record.
              However the user-visible value is reverted to what it previously was in the ListGrid when the save completes.

              This sounds like a bug though it's hard to be certain without seeing it occur. If you're saving user-edited values, you could use listGrid.saveEdits() rather than updateData(), which might make a difference but this is just a guess and may not be possible within your application.
              Any chance you can show us a test case (either something based on your app, but simplified down to a minimal test case we can run, or a modified version of one of the samples) so we can see the problem in action?

              Also, as always, please test with the latest nightly build in your branch and let us know which version the problem manifests on so we can be sure we aren't chasing something which is already resolved.

              Thanks
              Isomorphic Software

              Comment


                #8
                Your description of the problem is correct - but I need help mimicking the server-side behaviour with a standalone then I can try and give you a sample

                ALso, I am using the latest nightly
                Last edited by acarur01; 8 Apr 2014, 10:40. Reason: answer to the version being used

                Comment


                  #9
                  Can you simply create a clientOnly dataSource and populate with some dummy records (using 'cacheData')?
                  Seems like this issue is a problem in the ListGrid rather than the DataSource, so this should continue to reproduce the issue and make a standalone test case easy to create.

                  Thanks

                  EDIT: Also - latest nightly on 9.0p or 9.1p? Thanks
                  Last edited by Isomorphic; 8 Apr 2014, 10:46. Reason: Clarification on branch being used

                  Comment


                    #10
                    SmartClient_v91p_2014-04-08_PowerEdition

                    How do I mimic updating the record? So basically when I blur out of the field, i call updateData, it goes back to the server then the server responds with the record edited. I've attached what I have so far - By "the record edited" i mean some values have changed because of the Number of Processes value changing - this includes the displayValue being modified as well
                    Attached Files
                    Last edited by acarur01; 9 Apr 2014, 13:44. Reason: more information

                    Comment


                      #11
                      I just noticed something else in my environment - when I refresh, then the updated data is shown.

                      Comment


                        #12
                        To answer your question about simulating manipulation of the data occurring on the server-side, you could override your "transformResponse" or "transformRequest" methods in your clientOnly dataSource to change the submitted data (or modify the response) before the grid sees it.

                        However one thing that strikes us about this approach is that using the "blur" handler in this way to kick off a save seems like a somewhat risky approach. Blur doesn't necessarily equate to the user attempting to save or even truly navigate away from the cell. For example putting focus in a URL bar, or even something like showing a pop-up date-chooser etc within the form item could cause the blur to fire.
                        You might find you have more success working with the ListGridField.editorExit API rather than trapping blur. This would also give you the edited record directly, rather than having to query the grid for the edit row and work from there, etc).

                        We still don't know why exactly your implementation isn't working but it could be something to do with your explicit "updateData" call (from blur) colliding with the default auto-save behavior, in which case using the "editorExit" notification would likely be cleaner (it allows you to return false to cancel the default behavior, for example). It would also notify you when the user attempts to save via an "Enter" keypress, and would not fire when the user takes focus from the item without obviously intending to commit the change.

                        Other than that: Your description indicates that everything about this save is working except the grid is failing to refresh. One possible cause for this would be an actual error in the standard code flow which is causing it to crash before the standard grid refresh occurs. If you haven't already, it's definitely worth checking the SC developer console for any warnings (and the native browser JS console too).

                        Hopefully this helps. If not, we'd recommend you try the "transformRequest" approach to get this standalone test case up and running so we can see the problem firsthand.

                        Thanks
                        Isomorphic Software

                        Comment


                          #13
                          the blur is because we only want to go back to the server for a specific field. The server request isn't for saving either - for this particular case, the updated record modifies an icon which shows that the row contains unsaved changes (yes i know you have built-in logic that shows this in blue normally - but requirements asked for a specific icon to be modified based on logic that can only be calculated on the server side) -

                          anyway, one more behaviour i removed from my environment was the groupBy feature. Magically everything starter working so if that gives you more possible clues please let me know.. otherwise I will try the transformResponse standalone tomorrow.

                          Comment


                            #14
                            Just an FYI - this is the log messages when i put jsConsole to log "info" - I don't see anything alarming in these traces - maybe you'll spot something:

                            Code:
                            08:48:58.206:MDN4:INFO:gridEdit:page$dialog$content$$dialog$content$resultFormFrame$resultList:cellEditEnd: ending editing, completion event: click_outside
                            08:48:58.211:MDN4:INFO:gridEdit:page$dialog$content$$dialog$content$resultFormFrame$resultList:Saving newValues '{cwPK__: "USER.PROCESSES210110PE20110DEFAULT70",
                            numProcess: "40",
                            numProcess$DF: "40"}'
                            08:48:58.213:MDN4:INFO:DataSource:page$dialog$content$$dialog$content$resultFormFrame$resultList$ds:Calling convertRelativeDates from sendDSRequest - data is
                            
                            null
                            08:48:58.213:MDN4:INFO:AdvancedCriteria:Criteria object:{cwPK__: "USER.PROCESSES210110PE20110DEFAULT70",
                            numProcess: "40",
                            numProcess$DF: "40"} not explicitly marked as AdvancedCriteria - treating as SimpleCriteria.
                            08:48:58.214:MDN4:INFO:DataSource:page$dialog$content$$dialog$content$resultFormFrame$resultList$ds:Called convertRelativeDates from sendDSRequest - data is
                            
                            {
                                "cwPK__":"USER.PROCESSES210110PE20110DEFAULT70", 
                                "numProcess":"40", 
                                "numProcess$DF":"40"
                            }
                            08:48:58.214:MDN4:INFO:AdvancedCriteria:Criteria object:{cwPK__: "USER.PROCESSES210110PE20110DEFAULT70",
                            numProcess: "40",
                            numProcess$DF: "40"} not explicitly marked as AdvancedCriteria - treating as SimpleCriteria.
                            08:48:58.215:MDN4:INFO:AdvancedCriteria:Criteria object:{cwPK__: "USER.PROCESSES210110PE20110DEFAULT70",
                            returnEditIcon: "/ericsson/images/16/edit_16x16.png",
                            returnEditIcon$imageWidth: 16,
                            returnEditIcon$imageHeight: 16,
                            processName: "USER.PROCESSES",
                            nodeName: "PE",
                            numProcess: 1,
                            numProcess$DF: "1",
                            serialization: "DEFAULT",
                            serialization$DF: "DEFAULT",
                            groupParentId: undef,
                            name: "0_16",
                            isFolder: undef} not explicitly marked as AdvancedCriteria - treating as SimpleCriteria.
                            08:48:58.216:MDN4:INFO:DataSource:page$dialog$content$$dialog$content$resultFormFrame$resultList$ds:performDSOperation(update) 1 records
                            08:48:58.219:MDN4:INFO:RPCManager:sendQueue[2]: 1 RPCRequest(s); transport: xmlHttpRequest; target: http://localhost:8080/cwf/a?isc_rpc=1&isc_v=v9.1p_2014-04-08&isc_xhr=1
                            08:48:58.254:IBLR5:INFO:drawing:isc_TextItem_4[numProcess]:Form item cleared from within container widget page$dialog$content$$dialog$content$resultFormFrame$resultList_body
                            08:48:58.259:IBLR5:INFO:drawing:page$dialog$content$$dialog$content$resultFormFrame$serialization[serialization]:Form item cleared from within container widget page$dialog$content$$dialog$content$resultFormFrame$resultList_body
                            08:48:58.260:IBLR5:INFO:nativeFocus:page$dialog$content$$dialog$content$resultFormFrame$resultList_body:about to call native focus()
                            08:48:58.269:IBLR5:INFO:dragDrop:target is draggable with dragOperation: dragSelect, dragTarget is :[ListGrid ID:page$dialog$content$$dialog$content$resultFormFrame$resultList] (delegated from: [GridBody ID:page$dialog$content$$dialog$content$resultFormFrame$resultList_body])
                            08:48:58.278:MUP7:INFO:EventHandler:Target Canvas for event 'mouseup': [GridBody ID:page$dialog$content$$dialog$content$resultFormFrame$resultList_body]
                            08:48:58.293:TMR0:INFO:sizing:page$dialog$content$$dialog$content$resultFormFrame$resultList_body:Specified size: 750x846, drawn scroll size: 750x846, border: 0x0, margin: 0x0, reason: cell height changed
                            08:48:58.294:TMR0:INFO:scrolling:page$dialog$content$$dialog$content$resultFormFrame$resultList_body:Drawn size: 750 by 846, specified: 750 by 846, scrollbar state: 
                            08:48:58.436:XRP2:INFO:RPCManager:transaction 2 arrived after 208ms
                            08:48:58.448:XRP2:INFO:RPCManager:rpcResponse(page$dialog$content$$dialog$content$resultFormFrame$resultList$ds_fetch)[fetch]: result: 1 records[status=0]
                            08:48:58.450:XRP2:INFO:xmlBinding:page$dialog$content$$dialog$content$resultFormFrame$resultList$ds:dsResponse is: {operationId: "page$dialog$content$$dialog$content$resu..."[71],
                            clientContext: undef,
                            internalClientContext: Obj,
                            context: Obj,
                            transactionNum: 2,
                            httpResponseCode: 200,
                            httpResponseText: "//isc_RPCResponseStart-->[{affectedRows:..."[457],
                            xmlHttpRequest: [object XMLHttpRequest],
                            transport: "xmlHttpRequest",
                            status: 0,
                            clientOnly: undef,
                            httpHeaders: Obj,
                            isStructured: true,
                            callbackArgs: null,
                            results: Obj,
                            affectedRows: 0,
                            data: Array[1],
                            invalidateCache: false,
                            isDSResponse: true,
                            queueStatus: 0,
                            clientTiming: Obj{name:Client processing},
                            clientTimingStack: Array[2]}
                            08:48:58.451:XRP2:INFO:ResultSet:isc_ResultSet_0 (created by: page$dialog$content$$dialog$content$resultFormFrame$resultList):updating cache in place after operationType: update, allMatchingRowsCached true
                            08:48:58.452:XRP2:INFO:ResultSet:isc_ResultSet_0 (created by: page$dialog$content$$dialog$content$resultFormFrame$resultList):Updating cache: operationType 'update' submitted by 'page$dialog$content$$dialog$content$resultFormFrame$resultList',1 rows update data
                            08:48:58.455:XRP2:INFO:AdvancedCriteria:Criteria object:{} not explicitly marked as AdvancedCriteria - treating as SimpleCriteria.
                            08:48:58.456:XRP2:INFO:AdvancedCriteria:Criteria object:{} not explicitly marked as AdvancedCriteria - treating as SimpleCriteria.
                            08:48:58.458:XRP2:INFO:AdvancedCriteria:Criteria object:{} not explicitly marked as AdvancedCriteria - treating as SimpleCriteria.
                            08:48:58.459:XRP2:INFO:localFilter:isc_ResultSet_0 (created by: page$dialog$content$$dialog$content$resultFormFrame$resultList):Local filter applied: 20 of 20 records matched filter:{
                            }
                            08:48:58.460:XRP2:INFO:redraws:page$dialog$content$$dialog$content$resultFormFrame$resultList_body:Scheduling redraw (no reason provided)
                            08:48:58.590:TMR3:INFO:drawing:page$dialog$content$$dialog$content$resultFormFrame$resultList_body:$ra(): redrawing
                            08:48:58.812:TMR3:INFO:resize:page$dialog$content$$dialog$content$resultFormFrame$resultList_body:resize of drawn component: new width/height: 750,850, old width/height: 750,846, delta width/height: 0,4
                            08:48:58.822:TMR3:INFO:sizing:page$dialog$content$$dialog$content$resultFormFrame$resultList_body:Specified size: 750x850, drawn scroll size: 750x850, border: 0x0, margin: 0x0, reason: resize
                            08:48:58.822:TMR3:INFO:scrolling:page$dialog$content$$dialog$content$resultFormFrame$resultList_body:Drawn size: 750 by 850, specified: 750 by 850, scrollbar state: 
                            08:48:58.824:TMR3:INFO:sizing:page$dialog$content$$dialog$content$resultFormFrame$resultList_body:Specified size: 750x850, drawn scroll size: 750x850, border: 0x0, margin: 0x0, reason: redraw
                            08:48:58.824:TMR3:INFO:scrolling:page$dialog$content$$dialog$content$resultFormFrame$resultList_body:Drawn size: 750 by 850, specified: 750 by 850, scrollbar state: 
                            08:48:58.825:TMR3:INFO:recordComponents:page$dialog$content$$dialog$content$resultFormFrame$resultList:updateRecordComponents - new recordComponents:{}, old record components (will be cleaned up if value is 'true'):{}
                            08:48:58.825:TMR3:INFO:recordComponents:page$dialog$content$$dialog$content$resultFormFrame$resultList:updateRecordComponents - new recordComponents:{}, old record components (will be cleaned up if value is 'true'):{}
                            08:48:58.829:TMR3[E]:INFO:layout:page$dialog$content$$dialog$content$resultFormFrame$resultList:layoutChildren (reason: memberResized: (0,4): page$dialog$content$$dialog$content$resultFormFrame$resultList_body):
                            layout specified size: 750w x 500h
                            drawn size: 750w x 880h
                            available size: 750w x 500h (length)
                               [Toolbar ID:isc_Toolbar_0]
                                  30 drawn length (resizeLength: 30) (policyLength: 30) (explicit size)
                                  734 drawn breadth (explicit size)
                               [GridBody ID:page$dialog$content$$dialog$content$resultFormFrame$resultList_body]
                                  850 drawn length (resizeLength: 850) (policyLength: 850) (explicit size)
                                  750 drawn breadth (breadth policy: fill)
                            
                            08:48:58.830:TMR3[E]:INFO:sizing:page$dialog$content$$dialog$content$resultFormFrame$resultList:Specified size: 750x500, drawn scroll size: 750x880, border: 0x0, margin: 0x0, old size: 750x876, reason: undefined
                            08:48:58.848:TMR3[E]:INFO:layout:page$dialog$content$$dialog$content$resultFormFrame:layoutChildren (reason: memberResized: (0,4): page$dialog$content$$dialog$content$resultFormFrame$resultList):
                            layout specified size: 728w x 490h
                            drawn size: 750w x 880h
                            available size: 728w x 490h (length)[ListGrid ID:page$dialog$content$$dialog$content$resultFormFrame$resultList]
                                  880 drawn length (policyLength: 880) (inherent size)
                                  750 drawn breadth (explicit size)
                            
                            08:48:58.849:TMR3[E]:INFO:sizing:page$dialog$content$$dialog$content$resultFormFrame:Specified size: 728x490, drawn scroll size: 750x880, border: 0x0, margin: 0x0, old size: 750x876, reason: undefined
                            08:48:58.865:TMR3[E]:INFO:layout:page$dialog$content$$dialog$content$resultFormLayout:not applying height: 474 to overflowed member: [VStack ID:page$dialog$content$$dialog$content$resultFormFrame] w/height: 880
                            08:48:58.866:TMR3[E]:INFO:layout:page$dialog$content$$dialog$content$resultFormLayout:member: [VStack ID:page$dialog$content$$dialog$content$resultFormFrame] overflowed.  set length: 474 got length: 880
                            08:48:58.868:TMR3[E]:INFO:layout:page$dialog$content$$dialog$content$resultFormLayout:layoutChildren (reason: memberResized: (0,4): page$dialog$content$$dialog$content$resultFormFrame):
                            layout specified size: 744w x 500h
                            drawn size: 744w x 500h
                            available size: 728w x 484h (length)
                               [VStack ID:page$dialog$content$$dialog$content$resultFormFrame]
                                  880 drawn length (resizeLength: 474) (policyLength: 880) (explicit size)
                                  728 drawn breadth (breadth policy: fill)
                            
                            08:48:58.870:TMR3[E]:INFO:sizing:page$dialog$content$$dialog$content$resultFormLayout:Specified size: 744x500, drawn scroll size: 750x890, border: 0x0, margin: 0x0, reason: undefined
                            08:48:58.871:TMR3[E]:INFO:scrolling:page$dialog$content$$dialog$content$resultFormLayout:Drawn size: 750 by 890, specified: 744 by 500, scrollbar state: hv
                            08:48:58.874:TMR3[E]:INFO:resize:page$dialog$content$$dialog$content$resultFormLayout_vscroll_thumb:resize of drawn component: new width/height: 16,246, old width/height: 16,247, delta width/height: 0,-1
                            08:48:58.877:TMR3[E]:INFO:sizing:page$dialog$content$$dialog$content$resultFormLayout_vscroll_thumb:Specified size: 16x246, drawn scroll size: 16x246, border: 0x0, margin: 0x0, reason: resize
                            08:48:58.879:TMR3[E]:INFO:resize:page$dialog$content$$dialog$content$resultFormLayout_vscroll_thumb_label:resize of drawn component: new width/height: 16,246, old width/height: 16,247, delta width/height: 0,-1
                            08:48:58.880:TMR3[E]:INFO:redraws:page$dialog$content$$dialog$content$resultFormLayout_vscroll_thumb_label:Scheduling redraw (resize)
                            08:48:58.979:TMR1:INFO:sizing:page$dialog$content$$dialog$content$resultLayout:Specified size: 744x1, drawn scroll size: 744x500, border: 0x0, margin: 40x0, old size: 744x500, reason: child resize
                            08:48:58.986:TMR2:INFO:drawing:page$dialog$content$$dialog$content$resultFormLayout_vscroll_thumb_label:$ra(): redrawing
                            08:48:58.990:TMR2:INFO:sizing:page$dialog$content$$dialog$content$resultFormLayout_vscroll_thumb_label:Specified size: 16x246, drawn scroll size: 16x246, border: 0x0, margin: 0x0, reason: redraw
                            Edit - I just saw something after I posted: it goes from 40 back to 1 for "numProcesses". Not sure what this means or if it is possible cause:


                            08:48:58.213:MDN4:INFO:DataSource:page$dialog$content$$dialog$content$resultFormFrame$resultList$ds:Calling convertRelativeDates from sendDSRequest - data is

                            null
                            08:48:58.213:MDN4:INFO:AdvancedCriteria:Criteria object:{cwPK__: "USER.PROCESSES210110PE20110DEFAULT70",
                            numProcess: "40",
                            numProcess$DF: "40"} not explicitly marked as AdvancedCriteria - treating as SimpleCriteria.
                            08:48:58.214:MDN4:INFO:DataSource:page$dialog$content$$dialog$content$resultFormFrame$resultList$ds:Called convertRelativeDates from sendDSRequest - data is

                            {
                            "cwPK__":"USER.PROCESSES210110PE20110DEFAULT70",
                            "numProcess":"40",
                            "numProcess$DF":"40"
                            }
                            08:48:58.214:MDN4:INFO:AdvancedCriteria:Criteria object:{cwPK__: "USER.PROCESSES210110PE20110DEFAULT70",
                            numProcess: "40",
                            numProcess$DF: "40"} not explicitly marked as AdvancedCriteria - treating as SimpleCriteria.
                            08:48:58.215:MDN4:INFO:AdvancedCriteria:Criteria object:{cwPK__: "USER.PROCESSES210110PE20110DEFAULT70",
                            returnEditIcon: "/ericsson/images/16/edit_16x16.png",
                            returnEditIcon$imageWidth: 16,
                            returnEditIcon$imageHeight: 16,
                            processName: "USER.PROCESSES",
                            nodeName: "PE",
                            numProcess: 1,
                            numProcess$DF: "1",
                            serialization: "DEFAULT",
                            serialization$DF: "DEFAULT",
                            groupParentId: undef,
                            name: "0_16",
                            Last edited by acarur01; 10 Apr 2014, 04:59. Reason: minor detail found in the stack

                            Comment


                              #15
                              Difficult to tell - that warning is coming from the dataSource check to determine whether a given criteria is an advanced or a simple criteria. Not enough context to know where those criteria are coming from and therefore determine whether anything non-legitimate is happening.

                              I think we basically need a way to reproduce the problem before we will know what's going on.

                              Comment

                              Working...
                              X