Skip to main content

Need help! glue handlers are not getting called!

6 replies [Last post]
rambomogambo
Offline
Joined: 2008-06-05
Points: 0

I am having problem with getting handlers to run for the follwoing widgets. Please help ... Here is my jsp code, I have tried a few different ways to make the handler run, and tried a couple of different widgets ... but nope!

Please any help is most appreciated (ihave been at it since Sunday and struggling).

Eg.1

Eg.2

Eg.3

Here is my glue code ... which is not getting called at all.
jmaki.subscribe("/editJingle/*", function(args) {
alert("/editJingle/* !"); // THIS IS NEVER CALLED!
jmaki.publish('/jingle/setValue', 'Mogambo!'); // I'M JUST TESTING and RESETTING THE VALUE TO SOMETHING
});

With the scriptaculous.inplace widgets I can make it run a handler as long as it is *valueUpdate, like so ...
jmaki.subscribe("*valueUpdate", function(args) {
alert("*valueUpdate !"); // GETS CALLED FOR scriptaculous.inplace
});
but the issue with this is, after this runs, it looks like the event continues and I get a warning dialog box ... saying ...
'Error communicating with the server: Sun Java System Application Server 9.1_02 - Error report HTTP Status 404 - type Status reportmessagedescription resouce() is not available. Sun Java System Application Server 9.1_02"

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

can you provide he full jsp?

Also can you verify that the glue.js is included in the view / source?

you may also want to put the following lines in your glue.js which track publish / subscribe messages:

jmaki.debug = true;
jmaki.debugGlue = true;

Let us know once you verify that.

-Greg

rambomogambo
Offline
Joined: 2008-06-05
Points: 0

Hello Greg ... thank you for your response ... I had alrady enabled the debug and debugGlue and the logs confirm that the handler in the glue.js is not getting called.

I am pasting the jsp ... the format probably will get messed up as there is no code format in this editor.

{code}
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="a" uri="http://jmaki/v1.0/jsp" %>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

"http://www.w3.org/TR/html4/loose.dtd">



JSP Page

JSP Page

below we are testing ajax ...

Jingle:
Jingle:



{code}

Message was edited by: rambomogambo

rambomogambo
Offline
Joined: 2008-06-05
Points: 0

Anyone? Pl., I am still hanging out here.

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

Hi,

Do you have a resources/config.json with the glue.js entry set?

It should read something like:

{
"config": {
"version": "1.0",
"glue" : {
"includes": ["/glue.js", "/resources/system-glue.js"]
}
}
}

This file is what makes sure the glue.js gets loaded correctly.

To verify that the glue.js is loaded it's there just put an alert or jmaki.log message in the glue.js

You can also look at the rendered html to see if the link go the glue.js was loaded.

Let me know what you see.

-Greg

rambomogambo
Offline
Joined: 2008-06-05
Points: 0

Greg,

glue.js is getting included that is why the generic handler gets called; Issue has to do with making it publish to my topic ... looks like that is not working wrt. to jmaki scriptaculous.inplace widget.

PS: I did check the json.config and it has what you have mentioned.

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

any chance you can send me the app?

gmurray71 (a) dev.java.net