Author: abelevich
Date: 2010-11-19 10:20:42 -0500 (Fri, 19 Nov 2010)
New Revision: 20123
Added:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DragBehavior.java
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DropBehavior.java
Removed:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/AbstractDragSupport.java
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/AbstractDropSupport.java
Modified:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/renderkit/DragBehaviorRendererBase.java
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/renderkit/DropBehaviorRendererBase.java
Log:
implement DnD as behavior
Deleted:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/AbstractDragSupport.java
===================================================================
---
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/AbstractDragSupport.java 2010-11-19
14:56:10 UTC (rev 20122)
+++
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/AbstractDragSupport.java 2010-11-19
15:20:42 UTC (rev 20123)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-
-package org.richfaces.component;
-
-import org.richfaces.cdk.annotations.JsfComponent;
-import org.richfaces.cdk.annotations.JsfRenderer;
-import org.richfaces.cdk.annotations.Tag;
-
-
-/**
- * @author abelevich
- *
- */
-
-@JsfComponent(
- generate = "org.richfaces.component.UIDragSupport",
- renderer = @JsfRenderer(type = "org.richfaces.DragSupportRenderer"),
- tag = @Tag(name="dragSupport"),
- type = AbstractDragSupport.COMPONENT_TYPE,
- family = AbstractDragSupport.COMPONENT_FAMILY
-)
-public abstract class AbstractDragSupport extends AbstractActionComponent {
-
- public static final String COMPONENT_TYPE = "org.richfaces.DragSupport";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.DragSupport";
-
-}
-
-
Deleted:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/AbstractDropSupport.java
===================================================================
---
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/AbstractDropSupport.java 2010-11-19
14:56:10 UTC (rev 20122)
+++
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/AbstractDropSupport.java 2010-11-19
15:20:42 UTC (rev 20123)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.richfaces.component;
-
-import org.richfaces.cdk.annotations.JsfComponent;
-import org.richfaces.cdk.annotations.JsfRenderer;
-import org.richfaces.cdk.annotations.Tag;
-
-/**
- * @author abelevich
- *
- */
-@JsfComponent(
- generate = "org.richfaces.component.UIDropSupport",
- renderer = @JsfRenderer(type = "org.richfaces.DropSupportRenderer"),
- tag = @Tag(name="dropSupport"),
- type = AbstractDropSupport.COMPONENT_TYPE,
- family = AbstractDropSupport.COMPONENT_FAMILY
- )
-public abstract class AbstractDropSupport extends AbstractActionComponent {
-
- public static final String COMPONENT_TYPE = "org.richfaces.DropSupport";
-
- public static final String COMPONENT_FAMILY = "org.richfaces.DropSupport";
-
-}
Added:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DragBehavior.java
===================================================================
---
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DragBehavior.java
(rev 0)
+++
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DragBehavior.java 2010-11-19
15:20:42 UTC (rev 20123)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+
+package org.richfaces.component.behavior;
+
+import org.ajax4jsf.component.behavior.ClientBehavior;
+import org.richfaces.cdk.annotations.JsfBehavior;
+import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
+
+/**
+ * @author abelevich
+ *
+ */
+
+@JsfBehavior(
+ id = DragBehavior.BEHAVIOR_ID,
+ tag = @Tag(name = "dragBehavior",
+ handler = "org.richfaces.view.facelets.html.CustomBehaviorHandler",
+ type = TagType.Facelets))
+public class DragBehavior extends ClientBehavior {
+
+ public static final String BEHAVIOR_ID =
"org.richfaces.component.behavior.DragBehavior";
+
+ @Override
+ public void setLiteralAttribute(String name, Object value) {
+
+ }
+}
Added:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DropBehavior.java
===================================================================
---
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DropBehavior.java
(rev 0)
+++
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/component/behavior/DropBehavior.java 2010-11-19
15:20:42 UTC (rev 20123)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+
+package org.richfaces.component.behavior;
+
+import org.ajax4jsf.component.behavior.ClientBehavior;
+import org.richfaces.cdk.annotations.JsfBehavior;
+import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
+
+/**
+ * @author abelevich
+ *
+ */
+
+@JsfBehavior(
+ id = DropBehavior.BEHAVIOR_ID,
+ tag = @Tag(name = "dropBehavior",
+ handler = "org.richfaces.view.facelets.html.CustomBehaviorHandler",
+ type = TagType.Facelets))
+public class DropBehavior extends ClientBehavior {
+
+ public static final String BEHAVIOR_ID =
"org.richfaces.component.behavior.DropBehavior";
+
+ @Override
+ public void setLiteralAttribute(String name, Object value) {
+ }
+
+}
Modified:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/renderkit/DragBehaviorRendererBase.java
===================================================================
---
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/renderkit/DragBehaviorRendererBase.java 2010-11-19
14:56:10 UTC (rev 20122)
+++
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/renderkit/DragBehaviorRendererBase.java 2010-11-19
15:20:42 UTC (rev 20123)
@@ -24,6 +24,7 @@
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
+import javax.faces.render.ClientBehaviorRenderer;
/**
* @author abelevich
@@ -37,6 +38,6 @@
@ResourceDependency(name = "richfaces.js"),
@ResourceDependency(name = "richfaces-dnd.js")
})
-public class DragBehaviorRendererBase extends AjaxComponentRendererBase {
+public class DragBehaviorRendererBase extends ClientBehaviorRenderer {
}
Modified:
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/renderkit/DropBehaviorRendererBase.java
===================================================================
---
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/renderkit/DropBehaviorRendererBase.java 2010-11-19
14:56:10 UTC (rev 20122)
+++
sandbox/trunk/ui/drag-drop/ui/src/main/java/org/richfaces/renderkit/DropBehaviorRendererBase.java 2010-11-19
15:20:42 UTC (rev 20123)
@@ -24,6 +24,7 @@
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
+import javax.faces.render.ClientBehaviorRenderer;
/**
* @author abelevich
@@ -37,5 +38,5 @@
@ResourceDependency(name = "richfaces.js"),
@ResourceDependency(name = "richfaces-dnd.js")
})
-public class DropBehaviorRendererBase extends AjaxComponentRendererBase {
+public class DropBehaviorRendererBase extends ClientBehaviorRenderer {
}