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


Reply via email to