Author: mvitenkov
Date: 2008-08-05 06:52:02 -0400 (Tue, 05 Aug 2008)
New Revision: 9912
Modified:
trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp
Log:
+dndParam
Modified: trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp 2008-08-05
10:35:01 UTC (rev 9911)
+++ trunk/test-applications/jsp/src/main/webapp/DragAndDrop/DragAndDrop.jsp 2008-08-05
10:52:02 UTC (rev 9912)
@@ -30,7 +30,16 @@
ondragstart="#{event.ondragstart}"
onbeforedomupdate="#{event.onbeforedomupdate}"
ondropout="#{event.ondropout}"
ondropover="#{event.ondropover}"
- id="dragSupportID" binding="#{dndBean.htmlDrag}" >
+ id="dragSupportID" binding="#{dndBean.htmlDrag}"
dragIndicator="indicator">
+ <rich:dndParam name="default">
+ <h:graphicImage value="/pics/ajax_process.gif" />
+ </rich:dndParam>
+ <rich:dndParam name="accept">
+ <h:graphicImage value="/src/main/webapp/pics/expand.gif"/>
+ </rich:dndParam>
+ <rich:dndParam name="reject">
+ <h:graphicImage
value="/src/main/webapp/pics/collapse.gif"/>
+ </rich:dndParam>
</rich:dragSupport>
</h:panelGrid>
</h:column>
@@ -47,12 +56,13 @@
ondragenter="#{event.ondragenter}"
ondragexit="#{event.ondragexit}" ondrop="#{event.ondrop}"
ondropend="#{event.ondropend}"
oncomplete="#{event.oncomplete}"
- onbeforedomupdate="#{event.onbeforedomupdate}"
binding="#{dndBean.htmlDrop}">
+ onbeforedomupdate="#{event.onbeforedomupdate}"
+ binding="#{dndBean.htmlDrop}">
</rich:dropSupport>
</h:panelGrid>
</h:column>
</h:dataTable>
-
+
<h:panelGrid id="dndActionID" columns="1">
<h:commandButton action="#{dndBean.add1}" value="add Drag test"
/>
<h:commandButton action="#{dndBean.add2}" value="add Drop test"
/>
@@ -72,10 +82,13 @@
</f:facet>
<rich:dndParam name="accept" value="ACCEPT:" />
<rich:dndParam name="reject">
+
<f:verbatim>
<i style="text-decoration: line-through;">REJECT:</i>
</f:verbatim>
</rich:dndParam>
+ <rich:dndParam name="dropping"
value="dropping"></rich:dndParam>
+ <rich:dndParam name="dragging"
value="dragging"></rich:dndParam>
</rich:dragIndicator>
<rich:dragIndicator id="dIndicator"
acceptClass="defaultIndicator"
@@ -103,9 +116,8 @@
<h:panelGrid styleClass="dropzoneDecoration" id="grid1">
<f:verbatim>Accepts file and folder... Customizes</f:verbatim>
<rich:dropSupport id="zone1" oncomplete="#{event.oncomplete}"
- ondragenter="#{event.ondragenter}"
- ondragexit="#{event.ondragexit}" ondropend="#{event.ondropend}"
- ondrop="#{event.ondrop}"
+ ondragenter="#{event.ondragenter}"
ondragexit="#{event.ondragexit}"
+ ondropend="#{event.ondropend}" ondrop="#{event.ondrop}"
onbeforedomupdate="#{event.onbeforedomupdate}"
acceptedTypes="file, folder" typeMapping="{file: testDrop}">
<rich:dndParam name="testDrop">
@@ -124,9 +136,9 @@
<h:panelGrid styleClass="dropzoneDecoration" id="grid3">
<f:verbatim>Accepts none... Customizes</f:verbatim>
<rich:dropSupport typeMapping="{file: testDrop}"
- oncomplete="#{event.oncomplete}"
- ondragenter="#{event.ondragenter}"
ondragexit="#{event.ondragexit}"
- ondropend="#{event.ondropend}" ondrop="#{event.ondrop}"
+ oncomplete="#{event.oncomplete}"
ondragenter="#{event.ondragenter}"
+ ondragexit="#{event.ondragexit}" ondropend="#{event.ondropend}"
+ ondrop="#{event.ondrop}"
onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="testDrop">
<h:graphicImage height="16" width="16"
@@ -138,9 +150,9 @@
<h:panelGrid styleClass="dropzoneDecoration" id="grid4">
<f:verbatim>Accepts file and folder</f:verbatim>
<rich:dropSupport acceptedTypes="file, folder"
- oncomplete="#{event.oncomplete}"
- ondragenter="#{event.ondragenter}"
ondragexit="#{event.ondragexit}"
- ondropend="#{event.ondropend}" ondrop="#{event.ondrop}"
+ oncomplete="#{event.oncomplete}"
ondragenter="#{event.ondragenter}"
+ ondragexit="#{event.ondragexit}" ondropend="#{event.ondropend}"
+ ondrop="#{event.ondrop}"
onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="testDrop" value="testDropValue" />
</rich:dropSupport>
@@ -161,7 +173,8 @@
<rich:dragSupport dragType="file" dragIndicator="indicator"
ondragend="#{event.ondragend}"
ondragstart="#{event.ondragstart}"
ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
- oncomplete="#{event.oncomplete}"
onbeforedomupdate="#{event.onbeforedomupdate}">
+ oncomplete="#{event.oncomplete}"
+ onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="label" value="Label" />
<rich:dndParam name="testDrag" value="testDragValue" />
</rich:dragSupport>
@@ -172,7 +185,7 @@
<rich:dragSupport dragType="folder" dragIndicator="indicator"
ondragend="#{event.ondragend}"
ondragstart="#{event.ondragstart}"
ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
- oncomplete="#{event.oncomplete}"
+ oncomplete="#{event.oncomplete}"
onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="label" value="Label" />
<rich:dndParam name="testDrag" value="testDragValue for
Folder" />
@@ -208,7 +221,7 @@
<rich:dragSupport dragType="folder"
dragIndicator="defaultIndicator"
ondragend="#{event.ondragend}"
ondragstart="#{event.ondragstart}"
ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
- oncomplete="#{event.oncomplete}"
+ oncomplete="#{event.oncomplete}"
onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="label" value="testDragValue for Folder"
/>
</rich:dragSupport>
@@ -221,7 +234,7 @@
<rich:dragSupport dragType="file"
dragIndicator="defaultIndicator"
ondragend="#{event.ondragend}" ondragstart="#{event.ondragstart}"
ondropout="#{event.ondropout}" ondropover="#{event.ondropover}"
- oncomplete="#{event.oncomplete}"
+ oncomplete="#{event.oncomplete}"
onbeforedomupdate="#{event.onbeforedomupdate}">
<rich:dndParam name="marker" value="testMarkerValue" />
<rich:dndParam name="label" value="testDragValue" />
@@ -236,16 +249,17 @@
<div style="FONT-WEIGHT: bold;">rich:findComponent</div>
<h:panelGrid columns="2">
<rich:column>
- <a4j:commandLink value="getDragValue"
reRender="findID1"></a4j:commandLink>
+ <a4j:commandLink value="getDragType"
reRender="findID1"></a4j:commandLink>
</rich:column>
<rich:column id="findID1">
- <h:outputText
value="#{rich:findComponent('dragSupportID').dragValue}"/>
+ <h:outputText
value="#{rich:findComponent('dragSupportID').dragType}" />
</rich:column>
<rich:column>
<a4j:commandLink value="getDropValue"
reRender="findID2"></a4j:commandLink>
</rich:column>
<rich:column id="findID2">
- <h:outputText
value="#{rich:findComponent('dropSupportID').dropValue}" />
+ <h:outputText
+ value="#{rich:findComponent('dropSupportID').dropValue}" />
</rich:column>
<rich:column>
<a4j:commandLink value="getAcceptClass"
reRender="findID3"></a4j:commandLink>
Show replies by date