Skip to main content

widget value field?

1 reply [Last post]
ziebold
Offline
Joined: 2006-07-18
Points: 0

How do I set a value on a widget (ex. yahoo.button) to then be passed (via glue) to another widget?

I have been trying:

then in glue.js:

jmaki.listeners.onClick = function(args) {
jmaki.log("glue.js: args=" + args.value.something);
}

jmaki.addGlueListener("*onClick", "jmaki.listeners.onClick");

But the value comes back as "undefined".

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
azawawi
Offline
Joined: 2007-03-17
Points: 0

Hi,

The current implementation does not implement what you need. The glue value in args.value is simply {} for onClick and/or {id:"mywidget_id",value:"somevalue that this event returns} for onChange.

I checked if we can access wargs.value via jmaki.attributes and it seems that it saved after the initial addWidget(wargs) in a private "widgets" array variable. To implement such a feature, every widget must save wargs for later usage, or jmaki must expose the widgets array.

-Ahmad

> I have been trying:
>
>
>
> then in glue.js:
>
> jmaki.listeners.onClick = function(args) {
> jmaki.log("glue.js: args=" +
> args.value.something);
>
>
> jmaki.addGlueListener("*onClick",
> "jmaki.listeners.onClick");
>
> But the value comes back as "undefined".