locked
HTML Client, Modified Entities RRS feed

  • Question

  • In the LS Silverlight client I can get access to the number of non saved modified entities with:

    this.DataWorkspace.ApplicationData.Details.GetChanges().ModifiedEntities

    Is this possible in the HTML Client (client side)?


    • Edited by billym99 Friday, September 12, 2014 6:15 PM
    Friday, September 12, 2014 6:11 PM

Answers

  • Hi,

    yes it is posible.

    try this code

    myapp.activeDataWorkspace.ApplicationData.details.getChanges()

    • Marked as answer by Angie Xu Monday, September 29, 2014 7:15 AM
    Monday, September 22, 2014 7:23 PM

All replies

  • I'm not familiar with anything that will let you do that.  Although, to be fair - the ModifiedEntities collection is on the server side for a reason - it's about maintaining the integrity of the MVVM/MVC architecture.  The HTML client should (according to the principles of that architecture) be presentation only.  

    Keep in mind that the ModifiedEntities collection probably doesn't exist until you POST the data to the middle-tier. The HTML client should be holding the state of data entry private until that POST event occurs.  That said, there might be some things you can do on the client side to check the number of items returned to a table/list control when the screen is loaded, interrogate the dirty record markers in the client and update page controls using JavaScript assignments.  I haven't hit this use case before, but that's where I'd start.

    Sunday, September 14, 2014 8:39 AM
  • Hi,

    yes it is posible.

    try this code

    myapp.activeDataWorkspace.ApplicationData.details.getChanges()

    • Marked as answer by Angie Xu Monday, September 29, 2014 7:15 AM
    Monday, September 22, 2014 7:23 PM