Skip to main content

Showing dijit.dialog in JSF

1 reply [Last post]
blackjackal
Offline
Joined: 2008-09-29
Points: 0

Hi all,

I'm new to JSF and JMaki, but I'm very familiar with Java.
I've got a seemingly stupid question. After popping through example projects, I've been trying to figure out how to make a dijit dialog box show.
I've read how to use glue, but there are different notes on using listeners and not, not sure how that corresponds to versioning of JMaki, as it seems there are a lot of undocumented changes happening.

I'm using netbeans 6.1 deploying to Tomcat 6

Say I have a button that makes a dialog appear:

</p>
<p>

If I use args={show : true}, it displays on load just fine.
How do I modify the glue properly?
I've tried a few various combinations of:
jmaki.subscribe("/dojo/dijit/button/*", function(args) {<br />
    jmaki.log("Button pressed");<br />
    jmaki.publish("/dojo/dijit/dialog/", {show : true});<br />
});</p>
<p>jmaki.subscribe("/dojo/dijit/dialog/*", function(args) {<br />
// Just confirms publish was sent<br />
    jmaki.log("Show called");<br />
});

No such luck, no errors thrown.

Or do I use the addGlueListener? Because in some examples it looks like the publish/subscribe replaces the listener notation, but I'm a little lost in all this.

Thanks in advance

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
blackjackal
Offline
Joined: 2008-09-29
Points: 0

I got it working.
[code]jmaki.subscribe("/dojo/dijit/button/testButton/*", function(args) {
jmaki.log("Button pressed");
jmaki.publish("/dojo/dijit/dialog/show", {});
});[/code]
Had to publish right to show, not pass it in as an argument.

Message was edited by: blackjackal