Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Binding ComboBox with changing InputList
Binding ComboBox with changing InputList [message #780240] Tue, 17 January 2012 12:40 Go to next message
Markus Jo is currently offline Markus JoFriend
Messages: 83
Registered: January 2012
Member
Hi,
I have a very special binding problem.

I have an MasterDetail page that is based on an EMF model.

Master-Tree topLevel Objects are CoachGroup-Objects (called Wagenlauf).

Every CoachGroup has one ClientOrganization which defines his own list of ListingDevices.
AND every CoachGroup has a list of Listing-Objects which should get assigned one of the mentioned ListingDevices of the CoachGroups-ClientOrganization.

Maybe u already see the problem. Look at this strucutue:

index.php/fa/6764/0/

Because there is only one instance of DetailsPaige for all Listings (called Auslistung) I tried to reset the binding every time the DetailsPage changes (refresh() method).

Now to my problem. Something seems to be wrong with the input Lists.

The ClientOrganization of Wagenlauf 1 DB (CoachGroup) defines the available ListingDevices 0,1 and 2.
The ClientOrganization of Wagenlauf 2 (CoachGroup) defines the available ListingDevices 3 and 4.

When I enter the DetailsPage for the Auslistungen (Listing) of Wagenlauf1 I can select 0,1,2 and it is written the the model correctly...nice!
When I go to the DetailsPage for the Auslistung Device 3 (Listing) of Wagenlauf2 I can only choose 3 and 4 (what is correct, too).

BUT when I choose 3 in the ComboBox it is written 1 to the EMF data model. It seems to me that it somehow works with an index. If I choose the first Entry of Combo B it writes the first Entry of Combo B to the model. I have no idea why because I dropped the ComboBoxListViewer and the Binding and recreated it every time the DetailsPage is clicked/changed.

My Code is in the attached file.

Thanks very much.
Markus





  • Attachment: shoot.JPG
    (Size: 50.29KB, Downloaded 526 times)
  • Attachment: code.java
    (Size: 1.79KB, Downloaded 147 times)

[Updated on: Tue, 17 January 2012 12:59]

Report message to a moderator

Re: Binding ComboBox with changing InputList [message #782246 is a reply to message #780240] Mon, 23 January 2012 12:06 Go to previous message
Markus Jo is currently offline Markus JoFriend
Messages: 83
Registered: January 2012
Member
Problem is solved.

The real problem was not the binding...it was computing and updating the input list for the ComboBox.

I solved it like I described in this topic:

http://www.eclipse.org/forums/index.php/t/277258/
Previous Topic:adding a Java 3D view to my model
Next Topic:Cross-references
Goto Forum:
  


Current Time: Tue Apr 23 06:01:59 GMT 2024

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

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

Back to the top