Hey Chris,

and thanks for the support so far. This seems to work well for the
ListController itself, but in combination with the formController the form
still returns only a single value for the List. 

Again: the idea is to use the dynamic lists as part of the form, so the
returned Model for the form should contain the list and the list as a
content.

In my own code I add the dynamic list as a field to the form:

                  field = new pcmsgui.model.DynamicList();
                  field.setAssetId(name);
                  this.getForm().add(field, attribute.displayName, null,
name);

Any idea why the returned value is always the last item and not a set of
items?

A sample output:

        Dynamic List Model is: <div> <h3 class="title opened">MailCheck</h3>
<div>Der clevere MailCheck zeigt neue E-Mails und ist die sichere Verbindung
in Ihr Postfach </div> </div> <div> <h3 class="title opened">News</h3>
<div>Neueste Nachrichten direkt im Browser </div> </div> <div> <h3
class="title opened">Suche</h3> <div>Bilder, Webseiten und Angebote finden
</div> </div>,Item 1

        Form Model is:  {content: {"dynamicList":{text":"Item 1" }}

Whereas text should have been a list containing the dynamicList Model...

Thanks & Regards,
Paul

-----Ursprüngliche Nachricht-----
Von: Christian Hagendorn [mailto:[email protected]] 
Gesendet: Montag, 10. Oktober 2011 12:55
An: qooxdoo Development
Betreff: Re: [qooxdoo-devel] Storing an appenable list

Hi Paul,

sorry, I meant more instead of using a controller for a form use a
controller for the list like:
http://tinyurl.com/6x2fgc4

Cheers,
Chris

Am 10.10.2011 12:09, schrieb Paul Piper:
> Hey Christian,
>
> Unfortunately no. That is precisely what i have been doing during the 
> course of this weekend, but the issue remains. I still have to select 
> an item for it to be transferred back, otherwise getModel will always 
> return null on Listcontroller. Even when I select multiple items, no 
> more than 1 is being stored back (it always picks the value of for the 
> first item of the selection list).
>
> Again: I don't want the users to select anything, and I also don't 
> want to store only 1 item, but all items in the list. ListController 
> doesn't seem to work that way... :(
>
> Any other ideas? Could it be that I need to extend the listcontroller 
> as well? If so, where would be an ideal hook for the override of the 
> selection part and getModel part?
>
> Cheers,
> Paul
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Christian Hagendorn [mailto:[email protected]]
> Gesendet: Montag, 10. Oktober 2011 11:59
> An: qooxdoo Development
> Betreff: Re: [qooxdoo-devel] Storing an appenable list
>
> Hi Paul,
>
> ok, I think it would be better when you use a list with a controller 
> like [1]. The user action would create a new model item and add this 
> to the model form the list. The controller would create for you the 
> ListItem and you can use the model property to get the data to send it to
the server.
>
> Does this love you issue?
>
> Cheers,
> Chris
>
> [1]
> http://demo.qooxdoo.org/current/demobrowser/#data~ListController.html
> <http://demo.qooxdoo.org/current/demobrowser/#data%7EListController.ht
> ml>
>
> Am 10.10.2011 11:30, schrieb Paul Piper:
>> Hi Christian,
>>
>> no, of course not. The user can add multiple items to the list. By 
>> now I have come a little further, by using the ListController at all 
>> times, but still only 1 item is being returned and a selection is 
>> needed before the list is submitted. My use case still requires the 
>> user
> to:
>> * store all listitems
>> * store regardless of the selection (as a matter of fact: selection 
>> should not be available at all)
>>
>> I never thought this simple extension would require so much thought.
>> All in all, it is only a set of items, that the user can modify.
>>
>> Cheers,
>> Paul
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Christian Hagendorn [mailto:[email protected]]
>> Gesendet: Montag, 10. Oktober 2011 10:19
>> An: qooxdoo Development
>> Betreff: Re: [qooxdoo-devel] Storing an appenable list
>>
>> Hi,
>>
>> sorry for the late answer, but I was a bit busy. Now I  could spend 
>> some time for a deeper look.
>>
>> I saw that the "qx.data.controller.Form" needs a IModelSelection 
>> (model
>> selection) to handle the list. It would be possible to create an own 
>> list, and "fake" the model selection, but this requires that the user 
>> can only add one item to the custom list. Is that your use case? Can 
>> the user only add one item to the List?
>>
>> Cheers,
>> Chris
>>
>> Am 07.10.2011 17:47, schrieb Paul Piper:
>>> Maybe a playground example is of more help?
>>>
>>> http://tinyurl.com/3zoqcv5
>>>
>>>
>>> It will always return:
>>>
>>> 858988 qx.application.Standalone[519-0]: {"stuff":null}
>>>
>>> Though I would expect it to be: {"stuff":'oh noes'}
>>>
>>> -----Ursprüngliche Nachricht-----
>>> Von: Christian Hagendorn [mailto:[email protected]]
>>> Gesendet: Freitag, 7. Oktober 2011 16:12
>>> An: qooxdoo Development
>>> Betreff: Re: [qooxdoo-devel] Storing an appenable list
>>>
>>> Hi Paul,
>>>
>>> how do you create the form with your extended list do you use a 
>>> controller for your list. Could you please provide a short snipped?
>>>
>>> Thanks,
>>> Chris
>>>
>>> Am 07.10.2011 12:35, schrieb Paul Piper:
>>>> Hey,
>>>>
>>>> I got a feeling I may be missing something essential here. Is it 
>>>> possible that I need to use some remote model or such in order to 
>>>> store a list item to a list on the fly?
>>>>
>>>> See, the setup is like this:
>>>>
>>>> 1) I create an application, which creates the form.
>>>> 2) The form contains multiple lists, each are of a extended list 
>>>> type, which features a custom ListManager
>>>> 3) The listmanager handles the popup, which allows you to add data 
>>>> and has the following function:
>>>>
>>>> store: function(value) {
>>>>          if(this.getType() == "item"){
>>>>
>>>>          }else{
>>>>                  this.getElement().add(new 
>>>> pcmsgui.model.DynamicListItem(value,"test"));
>>>>                  this.debug("Model "+this.getElement().getModel());
>>>>          }
>>>>          this.getWindow().close();
>>>>         }
>>>>
>>>> This will close the window and add the data from the window input 
>>>> field to the list the listmanager manages.
>>>>
>>>> The list itself shows the new item afterwards just fine, but when I 
>>>> call the form controller, the data for the list remains null - I 
>>>> checked and it seems as if the model is null also.
>>>>
>>>> Any thought?
>>>>
>>>> Thanks for your support,
>>>> Paul
>>>>
>>>> -----Ursprüngliche Nachricht-----
>>>> Von: Christian Hagendorn [mailto:[email protected]]
>>>> Gesendet: Donnerstag, 6. Oktober 2011 10:51
>>>> An: qooxdoo Development
>>>> Betreff: Re: [qooxdoo-devel] Storing an appenable list
>>>>
>>>> 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-tp6859
>>>>>> 1
>>>>>> 4
>>>>>> 7
>>>>>> p
>>>>>> 6 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
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> -
>>>> -
>>>> -
>>>> -------- All of the data generated in your IT infrastructure is 
>>>> seriously valuable.
>>>> Why? It contains a definitive record of application performance, 
>>>> security threats, fraudulent activity, and more. Splunk takes this 
>>>> data and makes sense of it. IT sense. And common sense.
>>>> http://p.sf.net/sfu/splunk-d2dcopy2
>>>> _______________________________________________
>>>> qooxdoo-devel mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>> --------------------------------------------------------------------
>>> -
>>> -
>>> ------
>>> --
>>> All of the data generated in your IT infrastructure is seriously
> valuable.
>>> Why? It contains a definitive record of application performance, 
>>> security threats, fraudulent activity, and more. Splunk takes this 
>>> data and makes sense of it. IT sense. And common sense.
>>> http://p.sf.net/sfu/splunk-d2dcopy2
>>> _______________________________________________
>>> qooxdoo-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>
>>>
>>> --------------------------------------------------------------------
>>> -
>>> -
>>> -------- All of the data generated in your IT infrastructure is 
>>> seriously valuable.
>>> Why? It contains a definitive record of application performance, 
>>> security threats, fraudulent activity, and more. Splunk takes this 
>>> data and makes sense of it. IT sense. And common sense.
>>> http://p.sf.net/sfu/splunk-d2dcopy2
>>> _______________________________________________
>>> 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
>
>
> ----------------------------------------------------------------------
> -------- 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-d2d-oct
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to