1 Reply Latest reply on May 19, 2010 1:12 PM by Alex Uhlmann

    Editing multiple items

    meco943

      I'm new to cairngorm and would like to understand how can I edit multiple items at the same time.

      In all the examples that I saw there was a list of items bounded as: dataprovider="{model.contacts}" and a contact form was bounded as: text="{model.selectedContact.firstName}".

       

      My problem is that the user can have several contacts open in edit more at the same time, meaning that a selectedContact property on the model is not enough. It should be an array of selected contacts of something like that but then - how can I bind each new instance of the view to the correct instance in this array?

        • 1. Re: Editing multiple items
          Alex Uhlmann Level 3

          It depends on your use case but maybe think of a more elaborate object model than just one property. Maybe multiple properties satisfy your use case, maybe it's a collection or something else. You might consider also using MXML function bindings to retrieve the correct contact from a collection. Try to keep most of the behaviour inside the PM or other more functionally cohesive objects.