OnDrag fired with smartclient, but not with webclient

Questions and answers for designing and implementing forms in Servoy

OnDrag fired with smartclient, but not with webclient

Postby stefanoni » Mon Mar 11, 2013 6:06 pm

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
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: OnDrag fired with smartclient, but not with webclient

Postby stefanoni » Tue Mar 12, 2013 9:02 am

- maybe an option or something that turns off DnD ?

- or ist drag and drop working only for smartclient, but not for the webclient ?

- or only on the server but not in developer (have now not ready the server / database to test it) ?
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: OnDrag fired with smartclient, but not with webclient

Postby stefanoni » Wed Apr 03, 2013 4:00 pm

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 ?

Test.servoy
(6.4 KiB) Downloaded 307 times
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: OnDrag fired with smartclient, but not with webclient

Postby stefanoni » Mon Apr 08, 2013 10:23 am

... 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.... :cry:
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: OnDrag fired with smartclient, but not with webclient

Postby patrick » Tue Apr 09, 2013 1:52 pm

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 Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: OnDrag fired with smartclient, but not with webclient

Postby stefanoni » Wed Apr 10, 2013 11:50 am

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
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: OnDrag fired with smartclient, but not with webclient

Postby patrick » Wed Apr 10, 2013 12:49 pm

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 Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: OnDrag fired with smartclient, but not with webclient

Postby stefanoni » Wed Apr 10, 2013 2:51 pm

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
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: OnDrag fired with smartclient, but not with webclient

Postby patrick » Thu Apr 11, 2013 9:55 am

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.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: OnDrag fired with smartclient, but not with webclient

Postby stefanoni » Tue Apr 16, 2013 4:56 pm

Thank you Patrick

https://support.servoy.com/browse/SVY-4385

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.
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland


Return to Forms

Who is online

Users browsing this forum: No registered users and 8 guests