I tried drag and drop in the Developer / Version: 6.1.2 - build 1421 (browser Chrome):
- with smartclient it works a expected
- with webclient I have no reaction, just nothing happends when I drag
I Tested with the following Statement (same codebase for web and smart):
function onDrag(event) {
application.output(‘Ondrag…’ + event.getSource())
}
Any Idea what I do wrong ?
Thanks
After weeks of no answer…
I made a little test.servoy with only 2 fields an all the drag and drop routines, and it seems to be like I presume:
The webclient doesn’t fire the onDrag-, onDragOver-, onDrop-Routines !
Can please somebody from servoy confirm that drag and drop only works with smartclient ?
[attachment=0]Test.servoy[/attachment]
Test.servoy (6.4 KB)
… after another week
Who has ever done drag and drop with WEBclient ? Was it working in earlier versions ?
Thank you for any feedback. I feel quit alone after on month with no answers… ![Crying or Very sad :cry:]()
I think what you are trying to do here is a bit strange (dragging a text field). I have tested your solution and I can drag for example the label containing “DRAG THIS FIELD TO THE NEXT FIELD” anywhere just fine. I can also drag the text field, but only if I click and drag exactly on the field’s border. I guess that happens because most browsers support dragging text by default, so that might interfere.
I’d say the 95% use case of drag & drop in Servoy is dragging records from one table to another…
Patrick, very helpfull, thank you a lot !
I created a bad example (textfield) which really didn’t work. This gave me the “allegedly endorsement” that DnD is not working in Webclient…
With the positive reinforcement of your help I did a again closer look to my solution and found the problem only exist on buttons:
if I use a button, drag n drop works with smartclient, but not with webclient !
Why I use button ? I just put a label on my form, add an onAction-property an the label changes to a button !
If I use “label” I can drag and drop, but not click.
If I use “button” I can click, but not drag and drop.
How can I make the colered day-fields on my calendar dragable an clickable ?
http://www.dsug.eu/forum/index.php?page=Attachment&attachmentID=120
Hm. But isn’t that a bit strange design wise? I can click on a button and something fires. I can also drag the button around. I guess the problem is that in the browser, the mouse click is simply used as button action. What does the click do in this calendar? And: you can probably drag the button if you grab exactly the border of it…
Patrick,
The user doesn’t recognize the button as a button, but as a “day-field”.
Try this php-demo and click on any of the days (no mather an empty day, ore a colored one):
http://www.gigdoodle.ch/Gigd.php?Dirl=mao8mt81pdcouppj6a0q6bbis6
The click in need to turn ON and OFF the days color.
The user doesn’t recognice the DnD as a “moving the button”, but as a “moving the day-mark” from one field-
position to an other field-position (not available in this free-version of the php-demo).
For draging colored day(s) to an other position i need the drag n drop
Maybe you have a better idea then buttons, to show the colored days, let the user turn ON and OF the color, drag it
from one position to an other position.
thanks sandro
Now I get it. I think it should work if the onClick property of the button is turned off. You should be able to do both then: assign an onClick method and still drag the button.
Please file a bug report for not being able to drag a button that has the onClick property set.
Thank you Patrick
I tried with a html-area. This is dragable also in webclient, but I can’t display a value without a dataprovider, if I understood it right.