binding to a HasValue<T>

7 views
Skip to first unread message

Johan Rydberg

unread,
Sep 1, 2010, 7:29:20 AM9/1/10
to GWT Pectin
is it possible in version 0.8 to bind between two HasValue<T> ?
Or is there a standard adapter that adapts a HasValue into a
ValueModel?

It seems that Binder.bind() only accept ValueModel:s.

And is there any plans on getting rid of Value models and using
HasValue (and TakesValue in 2.1) straight on?


Andrew

unread,
Sep 1, 2010, 8:05:33 AM9/1/10
to GWT Pectin
HasValue<T> has the problem that HasValue<T>.setValue(T) doesn't fire
events by default to fire an event you have to call setValue(T, true)
which works fine for widgets but would have been totally unusable for
pectin.

I hadn't seen TakesValue<T>, but it doesn't fire events so could only
be used for a destination binding (like ValueTarget).

There's no adapter for HasValue but it wouldn't be hard to write one.
Binder could support it but I'm still concerned that people will
wonder why setValue(T) isn't working and will send me bugs reports...
(c:

Johan Rydberg

unread,
Sep 1, 2010, 10:50:13 AM9/1/10
to gwt-pecti...@googlegroups.com

> There's no adapter for HasValue but it wouldn't be hard to write one.
> Binder could support it but I'm still concerned that people will
> wonder why setValue(T) isn't working and will send me bugs reports...
>
I'll see if I can come up with a simple one.

I just published my (experimental) bean bindings:
http://github.com/jrydberg/jrydberg-bindings
(see *http://tinyurl.com/37aeo5n* for intended use)

It's pretty much a GWT-ified version of bindgen.

Andrew

unread,
Sep 1, 2010, 8:26:59 PM9/1/10
to GWT Pectin
On Sep 2, 12:50 am, Johan Rydberg <johan.rydb...@edgeware.tv> wrote:
> > There's no adapter for HasValue but it wouldn't be hard to write one.
> > Binder could support it but I'm still concerned that people will
> > wonder why setValue(T) isn't working and will send me bugs reports...
>
> I'll see if I can come up with a simple one.
>
> I just published my (experimental) bean bindings:http://github.com/jrydberg/jrydberg-bindings
> (see *http://tinyurl.com/37aeo5n*for intended use)
>
> It's pretty much a GWT-ified version of bindgen.

Cool, I'll have a look. The bindgen approach is really nice and I
wish I'd used that style instead of the current providers (but didn't
know how at the time).

Would you be happy to have a chat over skype at some point about it?
I'd like to talk about the binding events too.

Cheers

Johan Rydberg

unread,
Sep 2, 2010, 8:25:25 AM9/2/10
to gwt-pecti...@googlegroups.com
Sure. My skype-name is "jrydberg". I do not have a headset though,
so we'll be text-chatting all nigth long! :)

> Cheers
>
>

Reply all
Reply to author
Forward
0 new messages