Author: mvitenkov
Date: 2008-07-01 07:45:13 -0400 (Tue, 01 Jul 2008)
New Revision: 9313
Modified:
trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp
Log:
Modified: trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp 2008-07-01
10:48:58 UTC (rev 9312)
+++ trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp 2008-07-01
11:45:13 UTC (rev 9313)
@@ -2,8 +2,41 @@
<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib
uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib
uri="http://richfaces.org/rich" prefix="rich"%>
+<style type="text/css">
+.LeftTreePane {
+
+}
+.RightTreePane {
+
+}
+
+.TreeContainer {
+ overflow: auto;
+ height: 400px;
+ border: 3px inset gray;
+}
+</style>
+<script type="text/javascript">
+ // <![CDATA[
+ function blinkElement(elt) {
+ while (elt.tagName.toLowerCase() != 'table') {
+ elt = elt.parentNode;
+ }
+
+ elt.style.borderColor= '#5555FF';
+ elt.style.borderStyle= 'dotted';
+ elt.style.borderWidth = '3px';
+ setTimeout( function() { this.style.borderStyle = 'none'; }.bind(elt), 300);
+ }
+ // ]]>
+ </script>
<f:subview id="DataTableSubviewID">
+ <rich:dragIndicator id="treeIndicator">
+ <f:facet name="single">
+ <f:verbatim>{marker} {nodeParam}({treeParam})</f:verbatim>
+ </f:facet>
+ </rich:dragIndicator>
<rich:dataTable id="dataTableID" var="dataTableID"
value="#{dataTable.mounths}" rowKeyVar="key"
captionClass="#{style.captionClass}"
rowClasses="#{style.rowClasses}" headerClass="#{style.headerClass}"
footerClass="#{style.footerClass}" styleClass="#{style.styleClass}"
captionStyle="#{style.captionStyle}"
columnClasses="#{style.columnClasses}"
onRowClick="#{event.onRowClick};alert('row #{key}');"
rendered="#{dataTable.rendered}"
@@ -55,7 +88,20 @@
</rich:column>
</rich:columnGroup>
<rich:column styleClass="#{style.styleClassA}"
headerClass="#{style.headerClassA}"
footerClass="#{style.footerClassA}" style="#{style.styleA}"
rendered="#{dataTable.r2rendered}">
- <h:outputText value="#{dataTableID.day}" />
+ <rich:tree id="rightTree" style="width:300px"
+ nodeSelectListener="#{treeDndBean.processRSelection}"
+ reRender="selectedNodeR,rightContainer"
ajaxSubmitSelection="true"
+ switchType="client" value="#{treeDndBean.treeNodeRight}"
+ changeExpandListener="#{treeDndBean.onExpand}"
+ binding="#{treeDndBean.rightTree}"
+ onselected="window.status='selectedNode: '+event.selectedNode;"
+ onexpand="window.status='expandedNode: '+event.expandedNode"
+ oncollapse="window.status='collapsedNode: '+event.collapsedNode"
+ rowKeyVar="key" dropListener="#{treeDndBean.onDrop}"
+ dragListener="#{treeDndBean.onDrag}"
dragIndicator="treeIndicator"
+ acceptedTypes="treeNode" dragType="treeNode"
var="item">
+ <rich:dndParam name="treeParam" value="rightTree" />
+ </rich:tree>
</rich:column>
<rich:subTable id="detail" var="detail"
value="#{dataTableID.detail}"
columnClasses="#{style.columnClassesA}"
footerClass="#{style.footerClassA}"
headerClass="#{style.headerClassA}" rowClasses="#{style.rowClassesA}"
onclick="#{event.onclick}"
@@ -65,7 +111,7 @@
onRowDblClick="#{event.onRowDblClick}"
onRowMouseDown="#{event.onRowMouseDown}"
onRowMouseMove="#{event.onRowMouseMove}"
onRowMouseOut="#{event.onRowMouseOut}"
onRowMouseOver="#{event.onRowMouseOver}"
onRowMouseUp="#{event.onRowMouseUp}">
<rich:column id="name">
- <h:outputText value="#{detail.name}" />
+ <h:outputText value="123"></h:outputText>
</rich:column>
<rich:column id="qty" rendered="#{dataTable.r2rendered}">
<h:outputText value="#{detail.qty}" />
@@ -108,7 +154,7 @@
</f:facet>
<h:outputLabel value="Value:" for="field" />
- <h:inputText id="field" value="#{cell.value}"
required="true"/>
+ <h:inputText id="field" value="#{cell.value}" />
<h:outputText value="rowKeyVar:"></h:outputText>
<h:outputText value="#{myVar}"></h:outputText>
@@ -122,5 +168,7 @@
</a4j:outputPanel>
<h:commandButton action="#{testBean.submit}" value="Submit"
/>
<a4j:commandButton action="#{testBean.submitAjax}" value="Submit
Ajax" reRender="panel"/>
-
+ <br/>
+ <rich:spacer width="300" height="10"></rich:spacer>
+
</f:subview>