Vincent Demay a écrit :
Gohan a écrit :
I'm having some issues with the DojoDropContainer component of
wicket-contrib-dojo. As soon as I'm setting the layout in the css to be
"float: left;" for the images or whatever I like to drop, it won't work
(i.e. I can't drop any images to the DropContainer). If I switch back to
"float: top;" it works as it should.
Ok, I've never tried that , I add an issue on http://www.wicketstuff.org/jira. If you find others bugs, you can add it there
(http://www.wicketstuff.org/jira/browse/DOJO-22)

I took a look at your issue and reproduced it.
The main problem com from the dropContainer, the div representing drop container set width and height to 0 when insides div are "float:left". so you can fix the problem by setting a width and a height to your dropContainer :

<html>
   <head>
       <title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
       <style type="text/css">
       body { font-family : sans-serif; }
       .drag {
           background : #eee;
           border : 1px solid #999;
           -moz-border-radius : 5px;
           width: 200px;
           padding: 4px;
           float:left;
       }
       </style>
   </head>

<body>
   <div>
<div class="drag" wicket:id="dragContainer1"><img wicket:id="pic1" src="pic1.jpg"/></div> <div class="drag" wicket:id="dragContainer2"><img wicket:id="pic2" src="pic2.jpg"/></div> <div class="drag" wicket:id="dragContainer3"><img wicket:id="pic3" src="pic3.jpg"/></div>
       <div  style="clear:both;"/>
   </div>
   <hr/>
<div wicket:id="dropContainer" s*tyle="background-color:blue; width:400px;height:400px"*> <div class="drag" wicket:id="dragContainer4"><img wicket:id="pic4" src="pic4.jpg"/></div> <div class="drag" wicket:id="dragContainer5"><img wicket:id="pic5" src="pic5.jpg"/></div> </div>
   <div  style="clear:both;"/>


You can also set float left on the dropConatiner :

<html>
   <head>
       <title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
       <style type="text/css">
       body { font-family : sans-serif; }
       .drag {
           background : #eee;
           border : 1px solid #999;
           -moz-border-radius : 5px;
           width: 200px;
           padding: 4px;
           float:left;
       }
       </style>
   </head>

<body>
   <div>
<div class="drag" wicket:id="dragContainer1"><img wicket:id="pic1" src="pic1.jpg"/></div> <div class="drag" wicket:id="dragContainer2"><img wicket:id="pic2" src="pic2.jpg"/></div> <div class="drag" wicket:id="dragContainer3"><img wicket:id="pic3" src="pic3.jpg"/></div>
       <div  style="clear:both;"/>
   </div>
   <hr/>
<div wicket:id="dropContainer" *style="background-color:blue; float:left"*> <div class="drag" wicket:id="dragContainer4"><img wicket:id="pic4" src="pic4.jpg"/></div> <div class="drag" wicket:id="dragContainer5"><img wicket:id="pic5" src="pic5.jpg"/></div> </div>
   <div  style="clear:both;"/>
The other issue I have is that whenever I've moved all items from one drop
container to another (so that the first drop container is now empty) I
cannot drop anything back to this container.
In this case, drag container can only be drop on drop container. So if you want to drop back. You should have an other dropContainer where dragContainer are in at page loading.
Has anyone experienced the same issues? I'm using wicket 2.0-SNAPSHOT and
thus the 2.0-SNAPSHOT version of wicket contrib dojo.
wicket-contrib-dojo (WCD) 2.0 is less maintain than WCD 1.3. So if you can prefer 1.3.
Thanks
--
Vincent Demay
http://www.demay-fr.net/blog/


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to