Hi Paul,

I hope I understood your use case correct. You using an extended 
qx.ui.form.List (list) with the qx.data.controller.List (list 
controller) to fill the list with the data form the server. The add 
button creates a new ListItem and adds it to the list directly. The 
submit button tries to get the complete model form the 
qx.data.controller.Form (form controller), but the model doesn't contain 
the user created model items.

The problem is that the new items should only added to the model form 
the list controller. The list controller should then create the 
ListItems for the new items. The form controller should automatically 
get the model form the list controller. When you need to keep the data 
from the server, you can copy the data array, but keep in mind that this 
in only a shallow copy.

Cheers,
Chris

Am 05.10.2011 15:38, schrieb Paul Piper:
> Hey,
>
> all of that is done on application level. Basically, I have a data array
> that is loaded on application start. Depending on the data, the input fields
> and userdata is added to the screen.
>
> In this particular screenshot you can see the "add item" button - that one
> opens a popup, so that the user can add new information to it. On the return
> event, the window is closed and the data added as a new listitem to the
> list.
>
> Once the user submits the information back to the backend, I call the
> formcontroller getModel() function in order to fetch all data. I wouldn't
> want to fetch the data otherwise, since I need to keep the data structure
> provided by the getModel function. Rather I would want to extend the list
> with IForm Interface, so that getModel will also receive the proper values
> from it (ie by iterating over all listitems).
>
> All seems to work, but the data received through getModel is always null for
> the listitem. In addition, I need to select some item before submitting the
> form, otherwise it is marked as "required" ->  which sorta sucks as a
> validation method...
>
> Thanks&  Regards,
> Paul
>
> -----Ursprüngliche Nachricht-----
> Von: Christian Hagendorn [mailto:[email protected]]
> Gesendet: Mittwoch, 5. Oktober 2011 15:22
> An: qooxdoo Development
> Betreff: Re: [qooxdoo-devel] Storing an appenable list
>
> Hi Paul,
>
> thanks, how do you add the user item to the model?
>
> Cheers,
> Chris
>
> Am 05.10.2011 15:10, schrieb madppiper:
>> Hey Christian,
>>
>> it is a little difficult to describe it in detail, but perhaps an
>> image will
>> help:
>>
>> http://qooxdoo.678.n2.nabble.com/file/n6862056/dynamic_list.png
>>
>> The general idea is to extend the normal list, so that a user can
>> dynamically add edit and remove items from it. This is part of a form,
>> which, on submit, collects all relevant data and submits it to the
> backend.
>> The extension itself works fine, but I cannot get my head around on
>> how to collect the data with the, already existent, formcontroller.
>>
>> I tried to take a look at the mutable list that was posted here
>> before, but it doesn't seem to be a form extension, so many of the
>> things won't work - hence the idea to add it myself...
>>
>> Cheers,
>> Paul
>>
>>
>> -----
>> ---
>> Ilscipio - agency for eCommerce and OFBiz
>> --
>> View this message in context:
>> http://qooxdoo.678.n2.nabble.com/Storing-an-appenable-list-tp6859147p6
>> 862056.html Sent from the qooxdoo mailing list archive at Nabble.com.
>>
>> ----------------------------------------------------------------------
>> -------- All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity and more. Splunk takes this data
>> and makes sense of it. Business sense. IT sense. Common sense.
>> http://p.sf.net/sfu/splunk-d2dcopy1
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
> ----------------------------------------------------------------------------
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security threats,
> fraudulent activity and more. Splunk takes this data and makes sense of it.
> Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to