Martin, do you have a playground URL for your solution?!

T.

On 03/30/2011 01:26 PM, Martin Wittemann wrote:
> Hey, first of all welcome to the list!
>> But before that, some example in the playground:
>> http://tinyurl.com/5wxtcpl
>>
>> And the question is: how to achieve sync between the list and
>> selectbox data?
>
> The example looks good so far. The only thing you have to keep in
> mind is that you have to stay on the model level all the time.
> Manipulating the view (list e.g.) does usually not work. But its much
> comfortable to manipulate the data anyway. ;)
>
> So in the delete button listener, we have to do two things. First, we
> need to get the selected model object:
>
> var selectedModel = listController.getSelection().getItem(0);
>
> We need to use the getItem method on that array because its a qooxdoo
> data array. Thats also a well known source of mistakes. Just as a
> little warning here. ;)
>
> Second, we need to delete this selected model object from our model:
>
> listController.getModel().remove(selectedModel);
>
> Thats how easy it is. :)
>
> Do you also plan to synchronize the selection of list and selectbox?
> That could be a bit more tricky because you are not using the default
> model for the selectbox (see bindItem of the select box).
>
> Regards, Martin
> ------------------------------------------------------------------------------
>
>
Enable your software for Intel(R) Active Management Technology to meet the
> growing manageability and security demands of your customers.
> Businesses are taking advantage of Intel(R) vPro (TM) technology -
> will your software be a part of the solution? Download the Intel(R)
> Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar
> _______________________________________________ qooxdoo-devel mailing
> list [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to