drag and drop solution

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

drag and drop solution

Postby srowe » Mon Jan 11, 2010 8:57 pm

Is the solution available from Sean's demo? I can't seem to find any sample solutions for Servoy 5 using the drag and drop feature.


Thanks.
srowe
 
Posts: 74
Joined: Wed May 02, 2007 3:01 pm
Location: USA Missouri

Re: drag and drop solution

Postby sdevlin » Thu Jan 21, 2010 7:20 pm

I think this is the demo solution that was used Servoy World USA and Jan Aleman's presentations.
Attachments
demo_drag_n_drop.servoy
(28.94 KiB) Downloaded 468 times
Sean Devlin
Servoy USA
sdevlin
 
Posts: 125
Joined: Tue Apr 13, 2004 3:33 am

Re: drag and drop solution

Postby lesouef » Thu Jan 28, 2010 12:11 am

kind of weird example, it does not import correctly, most tables emty, creates wrong field definitions in the example db, 0 length, text field for ids. not usable as is... I doubt this did a demo.
lesouef
 
Posts: 420
Joined: Thu Oct 20, 2005 8:13 pm
Location: Strasbourg & Paris - France

Re: drag and drop solution

Postby lesouef » Mon Feb 01, 2010 4:53 pm

I made the few corrections to get it run.
but it seems that only "drag over" can be done on an empty related table; to use "drop", you need at least 1 sub-record to be there to act as the drop surface. Is that the way it is supposed to work? I guess a user would expect to add a new line as long as he drops within the tab panel, be it on on existing row or not.
Is there a way to get the "drop" surface = the "drag over" surface? of course one may wish to drop on a existing sub-record to update this particular line with the dropped information (2 source lists for instance, a product one + a supplier one).
any clue is welcome, this feature is very interesting...
lesouef
 
Posts: 420
Joined: Thu Oct 20, 2005 8:13 pm
Location: Strasbourg & Paris - France

Re: drag and drop solution

Postby david » Tue Feb 02, 2010 4:33 pm

In our experience drag and drop is still missing some important features to be really useful. Client design mode is even worse -- it's basically in proof-of-concept stage at this point.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: drag and drop solution

Postby jcompagner » Tue Feb 02, 2010 5:40 pm

what are the features of drag'n'drop you miss the most?
events? or specific data?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8858
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: drag and drop solution

Postby david » Tue Feb 02, 2010 6:46 pm

jcompagner wrote:what are the features of drag'n'drop you miss the most?
events? or specific data?


Client design and drag and drop are meant to implement fairly advanced and rich user interface design patterns. So our test with both was to implement Yahoo design patterns.

For drag and drop, we tested against:

http://developer.yahoo.com/ypatterns/ri ... dules.html

Couldn't implement 50% of the pattern with Servoy. So it's usable, but not that usable.

Client design mode is not usable for any design pattern worth using.
David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Re: drag and drop solution

Postby jcompagner » Tue Feb 02, 2010 8:01 pm

what did you test?
what solution did you try to make?
We use the yahoo drag n drops libs for the webclient
But web client drag n drop is most of time just a bit different. You drag elements and so on. But in servoy you reallly drag n drop data.

So give a servoy example what you want to do.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8858
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: drag and drop solution

Postby lesouef » Wed Feb 03, 2010 10:59 am

I have not thought that much about it to answer accurately as a product manager would do to drive a dev. (something I did in the past).
what comes out of my mind after my 1st attempt to use it is:
- what is the body or portal the only object which is drag/drop sensitive?
- I think there is a need to be able to drop into an empty table
- and it would be nice to make record lines droppable, ie if you drop on a specific record, the event returns the record id.
for instance, let say you want to setup an appointment in an agenda in a clinic with 20 doctors (3 tables then, doctors, patients, appointments), you may create an appointment record from the patients list, then drop the doctor's name on the appointement line; when dropping the doctor, you don"t want to creata a new record, but fill the doctor field of the existing appointment record.
lesouef
 
Posts: 420
Joined: Thu Oct 20, 2005 8:13 pm
Location: Strasbourg & Paris - France

Re: drag and drop solution

Postby jcompagner » Wed Feb 03, 2010 12:36 pm

lesouef wrote:I have not thought that much about it to answer accurately as a product manager would do to drive a dev. (something I did in the past).
what comes out of my mind after my 1st attempt to use it is:
- what is the body or portal the only object which is drag/drop sensitive?

do you mean "why is..."??
Labels and so on area also drag and drop sensitive, not only a body.
You get the element name when you start dragging and the same goes for when it is dropped.

lesouef wrote:- I think there is a need to be able to drop into an empty table

the weird thing is, i have looked at this (its a swing issue) and i worked around it so also the space underneath the rows can be dropped in.
But it seems that this doesnt work in all situations? I will try to reproduce this.

lesouef wrote:- and it would be nice to make record lines droppable, ie if you drop on a specific record, the event returns the record id.
for instance, let say you want to setup an appointment in an agenda in a clinic with 20 doctors (3 tables then, doctors, patients, appointments), you may create an appointment record from the patients list, then drop the doctor's name on the appointement line; when dropping the doctor, you don"t want to creata a new record, but fill the doctor field of the existing appointment record.


i guess you want the index of the foundset (if it is the record id you have to look it up by searching for it where it exactly is)
I will see if thats easy doable.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8858
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: drag and drop solution

Postby lesouef » Wed Feb 03, 2010 1:18 pm

the regular interface returns it: if you place a button in a row for instance, it returns the index, so it's a matter of having the row instead of the form background sensitive to drag actions. Simply a guess... because this is all magic to me!
lesouef
 
Posts: 420
Joined: Thu Oct 20, 2005 8:13 pm
Location: Strasbourg & Paris - France

Re: drag and drop solution

Postby LOGIsoft » Mon Feb 08, 2010 5:15 am

Hello everyone,

I was just going over the replay of Paul Bakker's excellent session on the new features of Servoy v5. However, the version of the sample solution for drag and drop he uses in his presentation does not seem to be the same one as the one posted earlier in this thread (which I haven't been able to get working on v5.0.1, by the way). Any chance we could get our hands on the ServoyCamp version?

Thanks in advance,

Ben
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada

Re: drag and drop solution

Postby lesouef » Mon Feb 08, 2010 11:09 am

to get it working, you have to populate the tables with a few records, then create an order_details record.
then drop a product on the existing order_detail line (drop only works on existing sub records, so no way to create the first one)
you also need to modify the ondrop method to add the product_id in the order_details record, otherwise the order_details new record is not linked.
untill the first record can be created, and the record index on which you drop returned, this is hardly usable for such an example.
lesouef
 
Posts: 420
Joined: Thu Oct 20, 2005 8:13 pm
Location: Strasbourg & Paris - France

Re: drag and drop solution

Postby LOGIsoft » Mon Feb 08, 2010 12:50 pm

That's why I'm asking for the sample file from ServoyCamp, because I'm trying with an order that contains order_detail records already, and the onDrop method doesn't even get fired (athough the onDrag method does). The onDrop method assigns a productid to the order_detail record, but like I said it doesn't get fired when dropped on an existing record. :?
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada

Re: drag and drop solution

Postby LOGIsoft » Mon Feb 08, 2010 1:23 pm

CORRECTION: It works as expected in the Web Client, not in Smart Client when started from Developer (v5.0.1). Not sure if it's a problem with the solution or my development environment (Mac OS 10.5.8, BrowserSuite plugin installed).
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada

Next

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 8 guests