Author: nbelaevski
Date: 2007-03-13 16:58:44 -0400 (Tue, 13 Mar 2007)
New Revision: 63
Modified:
trunk/richfaces-samples/dragDropDemo/src/main/java/org/richfaces/Bean.java
trunk/richfaces-samples/dragDropDemo/src/main/webapp/pages/index.jsp
Log:
Test cases updated to comply with new DnD supports
Modified: trunk/richfaces-samples/dragDropDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/richfaces-samples/dragDropDemo/src/main/java/org/richfaces/Bean.java 2007-03-13
20:58:09 UTC (rev 62)
+++ trunk/richfaces-samples/dragDropDemo/src/main/java/org/richfaces/Bean.java 2007-03-13
20:58:44 UTC (rev 63)
@@ -66,8 +66,8 @@
return null;
}
- public String action() {
- System.out.println("Bean.action()");
+ public String dropAction() {
+ System.out.println("Bean.dropAction()");
return null;
}
Modified: trunk/richfaces-samples/dragDropDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/dragDropDemo/src/main/webapp/pages/index.jsp 2007-03-13
20:58:09 UTC (rev 62)
+++ trunk/richfaces-samples/dragDropDemo/src/main/webapp/pages/index.jsp 2007-03-13
20:58:44 UTC (rev 63)
@@ -3,7 +3,7 @@
<%@ taglib
uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"
%>
-<%@ taglib
uri="http://richfaces.ajax4jsf.org/drag-drop"
prefix="dnd" %>
+<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/drag-drop"
prefix="dnd" %>
<html>
<head>
@@ -30,7 +30,7 @@
<h:panelGrid styleClass="dropzoneDecoration"
id="drop1">
<h:outputText value="#{type} - drop" />
- <dnd:dropSupport reRender="dragValueText"
action="#{bean.action}" acceptedTypes="#{type}"
dropListener="#{bean.processDrop}" dropValue="#{type} - value">
+ <dnd:dropSupport reRender="dragValueText"
action="#{bean.dropAction}" acceptedTypes="#{type}"
dropListener="#{bean.processDrop}" dropValue="#{type} - value">
<a4j:actionparam value="#{type} - test drop param"
assignTo="#{bean.testParam}" />
</dnd:dropSupport>
</h:panelGrid>
@@ -54,7 +54,7 @@
<h:panelGrid styleClass="dropzoneDecoration"
id="drop2">
<h:outputText value="#{type} - drop" />
- <dnd:dropSupport reRender="dragValueText"
action="#{bean.action}" acceptedTypes="#{type}"
dropListener="#{bean.processDrop}" dropValue="#{type} - value">
+ <dnd:dropSupport reRender="dragValueText"
action="#{bean.dropAction}" acceptedTypes="#{type}"
dropListener="#{bean.processDrop}" dropValue="#{type} - value">
</dnd:dropSupport>
</h:panelGrid>
</h:column>
@@ -194,10 +194,19 @@
</f:verbatim>
</h:panelGrid>
- <h:panelGrid id="renderedIdII">
+ <h:panelGroup id="group">
+ <f:verbatim>
+ PanelGroup
+ </f:verbatim>
<dnd:dropSupport acceptedTypes="file"
dropListener="#{bean.processDrop}" />
+ </h:panelGroup>
+
+ <h:panelGrid id="renderedIdII" style="border: 1px solid
red;">
+ <dnd:dropSupport acceptedTypes="file"
dropListener="#{bean.processDrop}" />
<f:verbatim>
- dropSupport
+ <div style="margin: 40px; border: 1px solid green;">
+ dropSupport
+ </div>
</f:verbatim>
</h:panelGrid>
@@ -206,6 +215,14 @@
<h:messages />
</a4j:outputPanel>
+ <h:outputText>
+ <dnd:dropSupport acceptedTypes="file" />
+ </h:outputText>
+
+ <h:outputText>
+ <dnd:dragSupport dragType="file" />
+ </h:outputText>
+
<iframe src="pages/test.html"></iframe>
</h:form>
</f:view>