Skip to main content

How to use jmaki.addWidget

5 replies [Last post]
castertroy
Offline
Joined: 2009-04-01
Points: 0

Hi,

Does anyone know where i can find the reference on how to use jmaki.addWidget?

thanks

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
Points: 0

Hi,

You may want to check out this page too:

https://ajax.dev.java.net/jmaki-html.html

Basically it uses the widget loader extension to load widgets and dependencies dynamically (after the page load).

The code is a little buried but you can find it here:

https://jmaki-ext.dev.java.net/source/browse/jmaki-ext/trunk/code/jmaki/...

Basically you add this extension after the jmaki.js as in the first page and you can load any widget you like.

You can also see it using jmaki.loadWidget which will do an immediate load.

jmaki.addWidget is used to add widgets as the page is loading and once the load is done the list of widgets built up using jmaki.addWidget is then loaded.

What are you trying to do with jmaki.addWidget?

castertroy
Offline
Joined: 2009-04-01
Points: 0

Hi,

Learning jmaki, i read Carla Mott's blog [b]http://weblogs.java.net/blog/carlavmott/archive/2008/08/getting_server.html[/b]. There i saw that she [b]pre-created[/b] a [i]yahoo.simpledlg[/i] with all the messages and buttons needed, hid it and showed it as triggered by an event.

I was supposed to use jmaki.addWidget to create dialogs as needed. The messages which i would place to the dialogs would come from user entry or somewhere else so i cant have them pre-created.

thanks

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Castertroy,

I've added the jMaki Light Boxes which is a little more advanced solution that I am using for my day job.

Find it at:

https://jmaki-ext.dev.java.net/servlets/ProjectDocumentList

In the lightbox/test directory there are a 3 of 4 examples of including text, external pages, widgets, an static content. See the index.html src.

This jmaki-lightbox.zip is a self contained zip and includes the latest version of jmaki.js (version 1.9.1) that I still testing before our next general release.

Please give the example a look and let me know if you have problems with it.

-Greg

castertroy
Offline
Joined: 2009-04-01
Points: 0

thanks Greg. The modal dialog boxes are neat :>

castertroy
Offline
Joined: 2009-04-01
Points: 0

nevermind, got it: https://ajax.dev.java.net/jsdocs/Jmaki.html#addWidget

samples would be useful though...