1 Reply Latest reply on Jan 24, 2012 3:41 PM by PierreSolutions

    Question About Value Object Classes

    OneofHis777

      Hello,

       

      Quick question, if you use an httpService that returns xml data to populate your value object class, then you populate an array collection with the data from the value object class, then bind the array collection to a data grid... When there is a change made to the data in the data grid through user input i.e. (delete, or update, or add) do you update the value object class with the new data somehow or do you update the array collection.

       

      Also once a change has been made the data the data has to be sent to the database, so do I do that after I update the value object and include a method for that in the class? Or do I just send it through an httpService then re-update the value object class again with the data from the result of the httpService.

       

      Any Advice is Totally Appreciated.

      Anthony Martin

        • 1. Re: Question About Value Object Classes
          PierreSolutions Level 2

          "When there is a change made to the data in the data grid through user input i.e. (delete, or update, or add) do you update the value object class with the new data somehow or do you update the array collection."

           

          It depends on how you implement the user's ability to change.

          Say the dataGrid that you bound your array collection to is dg1.

           

          If you are making changes to dg1.selectedItem then, as far as I understand, you are directly changing the values in the arrayCollection of value objects.

           

          Then you can send the one VO back up to the server.

          1 person found this helpful