Comboviewer binding in XWT [message #546834] |
Wed, 14 July 2010 12:00 |
Istvan Benedek Messages: 14 Registered: May 2010 |
Junior Member |
|
|
Hi,
I have an object model which contains an enumeration field. I would like to create for it an comboviewer on my xwt form.
I've put the chooseable items by setinput, I also define the contentprovider, labelprovider, everything works fine but the binding.
Let's say the model is a Phone entity which has to fields:
- phoneType is an enumeration
- number is a String
I would like to bind the phoneType to a comboviewer, it should be a comboviewer due to I have to provide the forms on many languages, so I have to use labelprovider..
So, any Idea how to bind the comboviewer's selected item to the model's phoneType?
Thx in advance,
Istvan
[Updated on: Wed, 14 July 2010 12:00] Report message to a moderator
|
|
|
Re: Comboviewer binding in XWT [message #547015 is a reply to message #546834] |
Thu, 15 July 2010 01:13 |
Yves YANG Messages: 688 Registered: July 2009 |
Senior Member |
|
|
In general, it should be:
<ComboViewer input="{binding path=phoneType}">
</ComboViewer>
But it needs a content provider to return all literals of enum. Please try
it your-self, If it doesn't work, please report a bug.
Best regards
Yves YANG
"Istvan Benedek" <istvan.benedek@bestest.hu> wrote in message
news:i1k8t1$mgq$1@build.eclipse.org...
> Hi,
> I have an object model which contains an enumeration field. I would like
> to create for it an comboviewer on my xwf form. I've put the chooseable
> items by setinput, I also define the contentprovider, labelprovider,
> everything works fine but the binding.
>
> Let's say the model is a Phone entity which has to fields:
> - phoneType is an enumeration
> - number is a String
>
> I would like to bind the phoneType to a comboviewer, it should be a
> comboviewer due to I have to provide the forms on many languages, so I
> have to use labelprovider..
>
> So, any Idea how to bind the comboviewer's selected item to the model's
> phoneType?
>
>
> Thx in advance,
>
> Istvan
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04760 seconds