Page 1 of 5

drag and drop solution

PostPosted: Mon Jan 11, 2010 8:57 pm
by srowe
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.

Re: drag and drop solution

PostPosted: Thu Jan 21, 2010 7:20 pm
by sdevlin
I think this is the demo solution that was used Servoy World USA and Jan Aleman's presentations.

Re: drag and drop solution

PostPosted: Thu Jan 28, 2010 12:11 am
by lesouef
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.

Re: drag and drop solution

PostPosted: Mon Feb 01, 2010 4:53 pm
by lesouef
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...

Re: drag and drop solution

PostPosted: Tue Feb 02, 2010 4:33 pm
by david
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.

Re: drag and drop solution

PostPosted: Tue Feb 02, 2010 5:40 pm
by jcompagner
what are the features of drag'n'drop you miss the most?
events? or specific data?

Re: drag and drop solution

PostPosted: Tue Feb 02, 2010 6:46 pm
by david
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.

Re: drag and drop solution

PostPosted: Tue Feb 02, 2010 8:01 pm
by jcompagner
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.

Re: drag and drop solution

PostPosted: Wed Feb 03, 2010 10:59 am
by lesouef
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.

Re: drag and drop solution

PostPosted: Wed Feb 03, 2010 12:36 pm
by jcompagner
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.

Re: drag and drop solution

PostPosted: Wed Feb 03, 2010 1:18 pm
by lesouef
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!

Re: drag and drop solution

PostPosted: Mon Feb 08, 2010 5:15 am
by LOGIsoft
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

Re: drag and drop solution

PostPosted: Mon Feb 08, 2010 11:09 am
by lesouef
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.

Re: drag and drop solution

PostPosted: Mon Feb 08, 2010 12:50 pm
by LOGIsoft
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. :?

Re: drag and drop solution

PostPosted: Mon Feb 08, 2010 1:23 pm
by LOGIsoft
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).