Skip to main content

Way to print out my jmaki widget? Or access parameters?

3 replies [Last post]
brucesamuels
Offline
Joined: 2008-02-29

I am using a jmaki widget inside an html table on the client side with the code :

SavedS.jsp creates a transformer and transforms an xsl file with an xml file to create a tree structure.

I want to access this jmaki widget to possibly change it's values or access its values.

In a Javascript function, I'm calling :

var mySavedS = document.getElementById('savedS');

to access the jmaki widget.

But how can I see the parameters of this widget if there are any and the values?

Can I print it out?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31

With a current version of jMaki 1.1 beta try;

// get a reference to the widget
var widget = jmaki.getWidget("savedS");

// manually turn on logging
jmaki.debug = true;

// display all public properties
// -1 will go down infinitively deep so you may want to use a value like 3
jmaki.log(jmaki.inspect(widget), -1);

Let us know if this doesn't work.

Alternately if you are using firebug try do a console.log(widget);

brucesamuels
Offline
Joined: 2008-02-29

Where does it log the information?

How can I access properties of the widget?

gmurray71
Offline
Joined: 2003-07-31

The jmaki.debug enables the jMaki logger which is browser neutral.

You can access the public properties of the widget using:

jmaki.getWidget('widgetid').propername

-Greg