Author: dsvyatobatsko
Date: 2008-09-30 10:05:27 -0400 (Tue, 30 Sep 2008)
New Revision: 10624
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDListener.java
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/dndTest.xhtml
Log:
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java 2008-09-30
13:36:30 UTC (rev 10623)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDBean.java 2008-09-30
14:05:27 UTC (rev 10624)
@@ -5,17 +5,18 @@
import org.richfaces.component.Dropzone;
import org.richfaces.event.DragEvent;
-import org.richfaces.event.DragListener;
import org.richfaces.event.DropEvent;
-import org.richfaces.event.DropListener;
/**
* copied from demo and tailored
*/
-public class DnDBean implements DropListener, DragListener {
+public class DnDBean {
private List<Framework> containerPHP;
+
private List<Framework> containerCF;
+
private List<Framework> containerDNET;
+
private List<Framework> frameworks;
public DnDBean() {
@@ -79,27 +80,15 @@
containerDNET = new ArrayList<Framework>();
}
-//
-// DropListener implementation
-//
- /**
- * @see DragListener#processDrag(DragEvent)
- */
- public void processDrag(DragEvent event) {
- // TODO Auto-generated method stub
- }
-
-//
-// DropListener implementation
-//
- /**
- * @see DropListener#processDrop(DropEvent)
- */
- public void processDrop(DropEvent event) {
+ public void processDropMethod(DropEvent event) {
Dropzone dropzone = (Dropzone) event.getComponent();
moveFramework(event.getDragValue(), dropzone.getDropValue());
}
+ public void processDragMethod(DragEvent event) {
+ // TODO Auto-generated method stub
+ }
+
/**
* Framework
*/
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDListener.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDListener.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDListener.java 2008-09-30
14:05:27 UTC (rev 10624)
@@ -0,0 +1,39 @@
+package org.ajax4jsf.bean;
+
+import javax.faces.context.FacesContext;
+
+import org.richfaces.component.Dropzone;
+import org.richfaces.event.DragEvent;
+import org.richfaces.event.DragListener;
+import org.richfaces.event.DropEvent;
+import org.richfaces.event.DropListener;
+
+public class DnDListener implements DragListener, DropListener {
+
+ private DnDBean instance;
+
+ protected DnDBean getDnDBean() {
+ if (null == instance) {
+ FacesContext fc = FacesContext.getCurrentInstance();
+ instance = (DnDBean) fc.getApplication().evaluateExpressionGet(fc,
"#{dndBean}", DnDBean.class);
+ }
+
+ return instance;
+ }
+
+//
+// DropListener implementation
+//
+ public void processDrag(DragEvent event) {
+ // TODO Auto-generated method stub
+ }
+
+//
+// DropListener implementation
+//
+ public void processDrop(DropEvent event) {
+ Dropzone dropzone = (Dropzone) event.getComponent();
+ getDnDBean().moveFramework(event.getDragValue(), dropzone.getDropValue());
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DnDListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/dndTest.xhtml
===================================================================
(Binary files differ)
Show replies by date