|gantt and databinding [message #599696]
||Tue, 25 May 2010 13:05
| Mauro Condarelli
Registered: September 2009
I have an EMF-based model that includes data I want to display as a GanttChart.
I would like to be able to edit the model via GanttEvent moving/resizing.
Using databinding would be nice, but I don't know how to access the GanttEvent properties (essentially StartDate, EndDate and PercentComplete).
I tried something like:
Timeline te; //<< this is my model element
DataBindingContext dbc = new DataBindingContext();
GanttEvent ge = new GanttEvent(ganttChart, te, te.getCaption(), cs, ce, 0);
//IObservableValue startDateW = PojoProperties.value("StartDate").observe(ge);
IObservableValue startDate = BeanProperties.value("StartDate").observe(ge);
IObservableValue startMillis = EMFProperties.value(WorldPackage.Literals.TIMELINE__START_DA TE).observe(te);
dbc.bindValue(startDate, startMillis, calendar2date, date2calendar);
.... but it doesn't work (unsurprisingly)
Thanks in Advance
Powered by FUDForum
. Page generated in 0.01346 seconds