[ 3 posts ]

francisco cornejo

  • Username: pcornejo
  • Joined: Wed Nov 16, 2011 3:11 am
  • Posts: 2
  • Offline
  • Profile

Drag and Drop, saving changes to database in java

Post Posted: Wed Nov 16, 2011 3:43 am
+0-
Hello, im very new using YUI library, and i think it is a bit confusing at first but im on it.

This is my scenario,

Im making a JSF application, i have users reperesented by its photo, so i want to drag a photo and drop into a group.
When i drop the photo i want to call a method in my bean class that save the data.

I did it with drag and drop implementation of richfaces <rich:dragSupport> but i have some conflicts with other script im using, so i want to doit with YUI.

My problem is that i dont know how to save the data when i drop the image. In rich faces there was a listener that calls a bean method with and object as argument so it was perfect to save the data dropped in dababase.

How can i do the same with YUI. How can i submit the element dropped to a java class that can handle the data and save it to Database?

Sorry for my english and thanks in advance :)

Juan Ignacio Dopazo

YUI Contributor

  • Username: jdopazo
  • Joined: Fri Oct 02, 2009 5:39 am
  • Posts: 619
  • Location: Buenos Aires, Argentina
  • Twitter: juandopazo
  • GitHub: juandopazo
  • Gists: juandopazo
  • Offline
  • Profile
Tags:

Re: Drag and Drop, saving changes to database in java

Post Posted: Thu Nov 17, 2011 9:00 am
+0-
Hey! YUI also has a lot of events for Drag & Drop that are useful for doing what you want. In particular drag:end or drag:drophit will probably be the ones you'll need to use, depending on your design. Check out the examples! For instance, this one does something similar to what you describe: http://yuilibrary.com/yui/docs/dd/drop-code.html

francisco cornejo

  • Username: pcornejo
  • Joined: Wed Nov 16, 2011 3:11 am
  • Posts: 2
  • Offline
  • Profile

Re: Drag and Drop, saving changes to database in java

Post Posted: Sun Nov 20, 2011 11:53 pm
+0-
Thanks Juan for reply my question but i think i have not explained well my problem.

I have no problems with the events, what i need is to know how i call a java method in my backed bean that save the changes in database.

-How i save the changes in database?
-Can i call a java method with parameters from yui?

Thanks in advance.
  [ 3 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum