Waldi Waldemar schrieb:
Hi,
My model:
Gruppe - Leiter - Person
1 - N 1 - 1
I have two ListViewers. There are view things from different resources.
On the left there is a complete list of Persons and on the right one is
the detail from a masterDetail scenario.
Now when I load the application new, all persons are viewed on the left
one. When I add a person to the detail view, the Person is removed from
the left viewer and added to the right. Thats all fine, but i would when
I start the application in the left one all persons are viewed in the
left one without there in the right on.
In my meaning i should implement a Filter, but i have problems with it,
can you help me there?
This are my inputs:
For my Detail ListViewer:
leiterAuswahl.setInput(EMFEditObservables.observeDetailList(Realm
.getDefault(), p.getEditingDomain(),
viewerSelection,
ZlvpPackage.Literals.GRUPPEN__LEITER));
ViewerFilter?
For my all Persons Viewer:
getPersons is a IObservableList.
leiter.setInput(p.getPersons());
it should be p.getPersons()-ZlvpPackage.Literals.GRUPPEN__LEITER) ;-)
Annother realy easy an short question:
I do this:
Command cmdRemove = RemoveCommand.create(p.getEditingDomain(), gruppe,
ZlvpPackage.Literals.GRUPPEN__LEITER, leiter);
if (cmdRemove.canExecute()) {
p.getEditingDomain().getCommandStack().execute(cmdRemove);
p.getResourcePerson().getContents().add(leiter.getPerson());
}else{
System.out.println("Hat ned geklappt");
}
It works fine but ithink it dirty. Is there another way to delete only a
reference? Only this: Command cmdRemove =
RemoveCommand.create(p.getEditingDomain(), gruppe,
ZlvpPackage.Literals.GRUPPEN__LEITER, leiter);
I'm not sure I understand what you are asking.
Tom