|
Re: List Databinding [message #63718 is a reply to message #63261] |
Fri, 30 November 2007 16:43 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
This is a multi-part message in MIME format.
--------------010508080404000804070109
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Hi,
I would guess that you need to provide an UpdateListStrategy
BeansObserable#observeList() call.
Attached is a snippet that shows a List widget that is bound to a model
that provides the available Locales. UpdateListStrategy, including
converters, are used there as well.
However I would rathe recommend to use a ListViewer along with an
ObservableListContentProvider.
Cheers,
R
|
|
|
Re: List Databinding [message #63766 is a reply to message #63718] |
Fri, 30 November 2007 16:52 |
Christian Messages: 31 Registered: July 2009 |
Member |
|
|
Thanks a lot Rudiger,
i've understood where I failed....i'll test your snippet asap.
Bye
Christian
Rüdiger Herrmann ha scritto:
> Hi,
>
> I would guess that you need to provide an UpdateListStrategy
> BeansObserable#observeList() call.
> Attached is a snippet that shows a List widget that is bound to a model
> that provides the available Locales. UpdateListStrategy, including
> converters, are used there as well.
> However I would rathe recommend to use a ListViewer along with an
> ObservableListContentProvider.
>
> Cheers,
> Rüdiger
>
>
> christian wrote:
>> Hi,
>> i've linked a List Object to an Arraylist contained in the model in this
>> way:
>>
>> bindingContext.bindList(SWTObservables.observeItems(_listGen re),
>> BeansObservable.observeList(Realm.getDefault(), model,
>> "listGenre"), null, null);
>>
>> _listGenre is the List object
>>
>>
>>
>> in the model i have put
>>
>>
>> public ArrayList<String> getListGenre() {
>> return listGenre;
>> }
>>
>> public void setListGenre(ArrayList<String> listGenre) {
>> ArrayList<String> old = listGenre;
>> this.listGenre = listGenre;
>> changeSupport.firePropertyChange("listGenre", old, listGenre);
>> }
>>
>>
>> In this way no items are added to the arrayList when the _listGenre is
>> filled with elements. What's wrong?
>>
>> thanks
>>
>> Christian
>
|
|
|
Powered by
FUDForum. Page generated in 0.03312 seconds