On Monday, January 7, 2013 8:39:40 AM UTC+1,
paran...@gmail.com wrote:
Hi Thomas,
yes that sounds like exactly what I need. What I don't really understand is:
------
you loop over the PropertyDto-s and push their values to the corresponding text box
------
how do I gain access to the text-boxes?
They're fields in your editor.
Do you have any example I can refer to?
Something like:
public class SectionDtoEditor extends Composite implements ValueAwareEditor<SectionDto> {
private SectionDto value;
@Editor.Ignore TextBox foo;
@Editor.Ignore TextBox bar;
…
@Override
public void setValue(SectionDto value) {
this.value = value;
foo.setValue(getPropertyDtoValue(value, "foo");
bar.setValue(getPropertyDtoValue(value, "bar"));
}
@Override
public void flush() {
setPropertyDtoValue(value, "foo", foo.getValue());
setPropertyDtoValue(value, "bar", bar.getValue());
}
…
}
where getPropertyDtoValue extracts the value from the PropertyDto whose id is the one given as argument, and setPropertyDtoValue does the reverse.