Author: nbelaevski
Date: 2008-12-04 13:47:19 -0500 (Thu, 04 Dec 2008)
New Revision: 11566
Modified:
trunk/framework/api/src/main/java/org/richfaces/event/DnDEvent.java
trunk/framework/api/src/main/java/org/richfaces/event/DragEvent.java
trunk/framework/api/src/main/java/org/richfaces/event/DropEvent.java
trunk/framework/impl/src/main/java/org/richfaces/renderkit/CompositeRenderer.java
Log:
DnD event and related classes refactored
Modified: trunk/framework/api/src/main/java/org/richfaces/event/DnDEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/DnDEvent.java 2008-12-04
18:37:08 UTC (rev 11565)
+++ trunk/framework/api/src/main/java/org/richfaces/event/DnDEvent.java 2008-12-04
18:47:19 UTC (rev 11566)
@@ -23,7 +23,6 @@
import javax.faces.component.UIComponent;
import javax.faces.event.FacesEvent;
-import javax.faces.event.FacesListener;
/**
*
@@ -44,25 +43,4 @@
super(component);
}
- protected Object value;
-
- private boolean valid = true;
-
- public boolean isAppropriateListener(FacesListener listener) {
- return valid;
- }
-
- public void invalidate() {
- valid = false;
- }
-
- public boolean isValid() {
- return valid;
- }
-
- public void processListener(FacesListener listener) {
- if (!valid) {
- throw new IllegalStateException();
- }
- }
}
Modified: trunk/framework/api/src/main/java/org/richfaces/event/DragEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/DragEvent.java 2008-12-04
18:37:08 UTC (rev 11565)
+++ trunk/framework/api/src/main/java/org/richfaces/event/DragEvent.java 2008-12-04
18:47:19 UTC (rev 11566)
@@ -36,6 +36,7 @@
private Dropzone dropTarget;
private Object acceptedTypes;
+ private Object dropValue;
/**
*
*/
@@ -49,14 +50,13 @@
* @see
javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
*/
public boolean isAppropriateListener(FacesListener faceslistener) {
- return super.isAppropriateListener(faceslistener) && faceslistener instanceof
DragListener;
+ return faceslistener instanceof DragListener;
}
/* (non-Javadoc)
* @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
*/
public void processListener(FacesListener faceslistener) {
- super.processListener(faceslistener);
((DragListener) faceslistener).processDrag(this);
}
@@ -93,10 +93,10 @@
}
public Object getDropValue() {
- return value;
+ return dropValue;
}
public void setDropValue(Object dropValue) {
- this.value = dropValue;
+ this.dropValue = dropValue;
}
}
Modified: trunk/framework/api/src/main/java/org/richfaces/event/DropEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/DropEvent.java 2008-12-04
18:37:08 UTC (rev 11565)
+++ trunk/framework/api/src/main/java/org/richfaces/event/DropEvent.java 2008-12-04
18:47:19 UTC (rev 11566)
@@ -40,6 +40,7 @@
private Draggable draggableSource;
private String dragType;
+ private Object dragValue;
public DropEvent(UIComponent component) {
super(component);
@@ -49,14 +50,13 @@
* @see
javax.faces.event.FacesEvent#isAppropriateListener(javax.faces.event.FacesListener)
*/
public boolean isAppropriateListener(FacesListener listener) {
- return super.isAppropriateListener(listener) && listener instanceof
DropListener;
+ return listener instanceof DropListener;
}
/* (non-Javadoc)
* @see javax.faces.event.FacesEvent#processListener(javax.faces.event.FacesListener)
*/
public void processListener(FacesListener listener) {
- super.processListener(listener);
((DropListener) listener).processDrop(this);
}
@@ -98,10 +98,10 @@
}
public Object getDragValue() {
- return value;
+ return dragValue;
}
public void setDragValue(Object dragValue) {
- this.value = dragValue;
+ this.dragValue = dragValue;
}
}
Modified:
trunk/framework/impl/src/main/java/org/richfaces/renderkit/CompositeRenderer.java
===================================================================
---
trunk/framework/impl/src/main/java/org/richfaces/renderkit/CompositeRenderer.java 2008-12-04
18:37:08 UTC (rev 11565)
+++
trunk/framework/impl/src/main/java/org/richfaces/renderkit/CompositeRenderer.java 2008-12-04
18:47:19 UTC (rev 11566)
@@ -219,11 +219,6 @@
return (RendererContributor[]) renderers.toArray(new
RendererContributor[renderers.size()]);
}
- public void contributorDecodeCallback(UIComponent component, FacesContext context,
RendererContributor contributor,
- Object argument) {
-
- }
-
protected void addParameterEncoder(AttributeParametersEncoder encoder) {
parameterEncoders.add(encoder);
}