I don't know, the exception messages aren't really helpful all the time.
Maybe you could try the following:
- can you load the file by requesting it in your browser? e.g. something
like:
http://localhost/dojo-examples/resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior/dojodnd/DojoDropContainer.js
- If you use Firebug (plugin for Firefox) you can see the files Dojo
tries to load. Does it try to load files from the correct path?
- Do we need a __package__.js file in org/wicketstuff/dojo/dojodnd? I'm
not really sure what it does, it seems to work here without it.
- How many errors/exceptions are there? Sometimes these exceptions
follow on an earlier exception when a file contains a syntax error.
- Are you sure you are looking at the latest revision? I used more than
one commit.
HTH,
Bart.
Vincent Demay wrote:
Bart Molenkamp a écrit :
Hi,
I committed my changes. Take a look at the package
org.wicketstuff.dojo.dojodnd. For example, look how DojoDragContainer
is declared, and how DojoDragCopyContainer extends it (it overrides
the createDragSource() function to create a different kind of drag
source). The *Template.js files are not used anymore, they could be
deleted.
I also added a new sample, see the package
org.wicketstuff.dojo.examples.dnd (JS classes extending the base drag
and drop classes). I updated the existing dnd samples to demonstrate
the DojoDragCopyContainer as well.
Bart.
Hi bart,
I'm looking at it. I like the concept, and it is particulary usefull for
dnd. But I've got a problem, wicketstuff seems to be unreachable in
exemples :
[Exception... "'Error: ReferenceError: wicketstuff is not defined' when
calling method: [nsIDOMEventListener::handleEvent]" nsresult:
"0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>"
data: no]
Could not load 'wicketstuff.dojodnd.DojoDragCopyContainer'; last tried
'__package__.js'
I checked genarated js, and it seems OK :
<script type="text/javascript"
src="resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior/dojo-0.4/dojo.js"></script>
<script type="text/javascript"
src="resources/org.wicketstuff.dojo.AbstractRequireDojoBehavior/dojo-wicket/dojoWicket.js"></script>
<script type="text/javascript"
id="org.wicketstuff.dojo.AbstractDefaultDojoBehavior/namespaces/wicketstuff"><!--/*--><![CDATA[/*><!--*/
dojo.registerModulePath("wicketstuff",
"../../../resources/org.wicketstuff.dojo.AbstractDefaultDojoBehavior/")/*-->]]>*/</script>
[...]
<script type="text/javascript"
id="org.wicketstuff.dojo.AbstractRequireDojoBehavior"><!--/*--><![CDATA[/*><!--*/
dojo.require("dojo.io.*")
dojo.require("dojo.dnd.*")
dojo.require("dojo.event.*")
dojo.require("wicketstuff.dojodnd.DojoDropContainer")
/*-->]]>*/</script>
<script type="text/javascript"
id="dropContainer0onLoad"><!--/*--><![CDATA[/*><!--*/
dojo.event.connect(dojo, "loaded", function() {new
wicketstuff.dojodnd.DojoDropContainer('dropContainer0', ['*'],
'?wicket:interface=:14:dropContainer:-1:IUnversionedBehaviorListener:0&wicket:ignoreIfNotActive=true').initializeDropContainer();
});
/*-->]]>*/</script>
[...]
any idea?
--
Vincent