Author: nbelaevski
Date: 2007-03-29 15:10:02 -0400 (Thu, 29 Mar 2007)
New Revision: 215
Modified:
trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java
trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp
Log:
Drag enable/disable switch added as test case to
http://jira.jboss.com/jira/browse/RF-48
Modified: trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java 2007-03-29
19:09:33 UTC (rev 214)
+++ trunk/richfaces-samples/tree-demo/src/main/java/org/richfaces/Bean.java 2007-03-29
19:10:02 UTC (rev 215)
@@ -64,6 +64,8 @@
private String pathToExpand;
+ private boolean dragOn = true;
+
public String getIcon() {
return icon;
}
@@ -292,4 +294,12 @@
return null;
}
+
+ public boolean isDragOn() {
+ return dragOn;
+ }
+
+ public void setDragOn(boolean dragOn) {
+ this.dragOn = dragOn;
+ }
}
\ No newline at end of file
Modified: trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp 2007-03-29 19:09:33
UTC (rev 214)
+++ trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp 2007-03-29 19:10:02
UTC (rev 215)
@@ -44,6 +44,13 @@
</h:selectOneRadio>
<h:outputText value="SwitchType is: #{bean.switchType}" />
<br />
+ <h:outputText value="Drag switch:" />
+ <h:selectOneRadio value="#{bean.dragOn}"
onclick="submit()">
+ <f:selectItem itemLabel="on" itemValue="#{true}" />
+ <f:selectItem itemLabel="off" itemValue="#{false}" />
+ </h:selectOneRadio>
+ <h:outputText value="Drag is: #{bean.dragOn ? 'on' :
'off'}" />
+ <br />
<h:commandButton value="#{bean.commandButtonCaption}"
actionListener="#{bean.changeIcons}" />
@@ -61,7 +68,7 @@
immediate="false"
acceptedTypes="file1"
- dragType="file1"
+ dragType="#{bean.dragOn ? 'file1' : ''}"
iconCollapsed="#{bean.iconCollapsed}"
iconExpanded="#{bean.iconExpanded}"