Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Comboviewer binding in XWT
Comboviewer binding in XWT [message #578755] Wed, 14 July 2010 12:00 Go to next message
Istvan Benedek is currently offline Istvan BenedekFriend
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 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
Re: Comboviewer binding in XWT [message #578773 is a reply to message #578755] Thu, 15 July 2010 01:13 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
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
>
>
>
Re: Comboviewer binding in XWT [message #578830 is a reply to message #578755] Sat, 17 July 2010 01:51 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
I have made a try. The solution I suggested doesn't work.

I have created a bug to track the development of this feature
https://bugs.eclipse.org/bugs/show_bug.cgi?id=320154

Best regards
Yves YANG
Re: Comboviewer binding in XWT [message #578844 is a reply to message #578830] Mon, 19 July 2010 08:18 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
This featrue is implemented. The modification is committed in CVS. It'll be
available in the next build.

Please read the bug comment to get more information.

Best regards
Yves YANG
"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:i1r2bi$dsg$1@build.eclipse.org...
>I have made a try. The solution I suggested doesn't work.
> I have created a bug to track the development of this feature
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=320154
>
> Best regards
> Yves YANG
Re: Comboviewer binding in XWT [message #579535 is a reply to message #578755] Wed, 28 July 2010 15:33 Go to previous messageGo to next message
Mo P. is currently offline Mo P.Friend
Messages: 24
Registered: July 2010
Junior Member
org.eclipse.e4.xwt.XWTException: Type cannot be a content of java.lang.Object org.eclipse.e4.xwt.internal.core.Binding.source


When I try the ComboViewer examples I get that exception. Did I forget anything?
Re: Comboviewer binding in XWT [message #579610 is a reply to message #578755] Thu, 29 July 2010 15:00 Go to previous messageGo to next message
Mo P. is currently offline Mo P.Friend
Messages: 24
Registered: July 2010
Junior Member
I tried the ComboViewer_enum and ComboViewer_enum_singleSelection which are both in ...tests.jface.enumeration.
Re: Comboviewer binding in XWT [message #579914 is a reply to message #579610] Sat, 31 July 2010 08:44 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
The testcase works fine for me. Please make sure you have used the last
build.

Best regards
Yves YANG
"Mo P." <moritzpavlik@gmx.de> wrote in message
news:i2s51m$eo8$1@build.eclipse.org...
>I tried the ComboViewer_enum and ComboViewer_enum_singleSelection which are
>both in ...tests.jface.enumeration.
Re: Comboviewer binding in XWT [message #580839 is a reply to message #578755] Mon, 16 August 2010 12:39 Go to previous messageGo to next message
Mo P. is currently offline Mo P.Friend
Messages: 24
Registered: July 2010
Junior Member
where can i get the latest build? do i have to check out the classes and build the jar on my own?

when i download the latest release of eclipse e4 the filename is org.eclipse.e4.xwt_0.9.1.v20100720-1930.jar. why isnt that jar updated?

thanks in advance
Re: Comboviewer binding in XWT [message #581009 is a reply to message #580839] Wed, 18 August 2010 21:54 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
You can find here:
http://download.eclipse.org/e4/downloads/

Best regards
Yves YANG
"Mo P." <moritzpavlik@gmx.de> wrote in message
news:i4bbi7$ikh$1@build.eclipse.org...
> where can i get the latest build? do i have to check out the classes and
> build the jar on my own?
>
> when i download the latest release of eclipse e4 the filename is
> org.eclipse.e4.xwt_0.9.1.v20100720-1930.jar. why isnt that jar updated?
>
> thanks in advance
Previous Topic:Comboviewer binding in XWT
Next Topic:How to add custom widgets to XWT designer palette
Goto Forum:
  


Current Time: Thu Apr 25 08:46:10 GMT 2024

Powered by FUDForum. Page generated in 0.03509 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top