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-tp685914
>>>> 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

Reply via email to