On Monday, January 7, 2013 8:39:40 AM UTC+1, [email protected] 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.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/8slsqTGEa_EJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.