Author: mvitenkov
Date: 2008-07-01 09:04:33 -0400 (Tue, 01 Jul 2008)
New Revision: 9317
Modified:
trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp
trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp
Log:
rowKeyVar for trees + findComponent test
Modified: trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp 2008-07-01
12:58:39 UTC (rev 9316)
+++ trunk/test-applications/jsp/src/main/webapp/DataTable/DataTable.jsp 2008-07-01
13:04:33 UTC (rev 9317)
@@ -88,7 +88,7 @@
</rich:column>
</rich:columnGroup>
<rich:column styleClass="#{style.styleClassA}"
headerClass="#{style.headerClassA}"
footerClass="#{style.footerClassA}" style="#{style.styleA}"
rendered="#{dataTable.r2rendered}">
- <rich:tree id="rightTree" style="width:300px"
+ <rich:tree id="rightTree" style="width:300px"
nodeSelectListener="#{treeDndBean.processRSelection}"
reRender="selectedNodeR,rightContainer"
ajaxSubmitSelection="true"
switchType="client" value="#{treeDndBean.treeNodeRight}"
@@ -97,13 +97,13 @@
onselected="window.status='selectedNode: '+event.selectedNode;"
onexpand="window.status='expandedNode: '+event.expandedNode"
oncollapse="window.status='collapsedNode: '+event.collapsedNode"
- rowKeyVar="key" dropListener="#{treeDndBean.onDrop}"
+ rowKeyVar="RTreeKey" 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}"
+ <rich:subTable id="detail" var="detail"
value="#{dataTableID.detail}" rowKeyVar="subRowKey"
columnClasses="#{style.columnClassesA}"
footerClass="#{style.footerClassA}"
headerClass="#{style.headerClassA}" rowClasses="#{style.rowClassesA}"
onclick="#{event.onclick}"
ondblclick="#{event.ondblclick}" onkeydown="#{event.onkeydown}"
onkeypress="#{event.onkeypress}" onkeyup="#{event.onkeyup}"
onmousedown="#{event.onmousedown}"
onmousemove="#{event.onmousemove}" onmouseout="#{event.onmouseout}"
@@ -111,7 +111,22 @@
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="123"></h:outputText>
+ <rich:tree id="leftTree" style="width:300px"
+ nodeSelectListener="#{treeDndBean.processLSelection}"
+ reRender="selectedNodeL" ajaxSubmitSelection="true"
+ switchType="client" value="#{treeDndBean.treeNodeLeft}"
+ changeExpandListener="#{treeDndBean.onExpand}"
+ binding="#{treeDndBean.leftTree}"
+ onselected="window.status='selectedNode: '+event.selectedNode;"
+ onexpand="window.status='expandedNode: '+event.expandedNode"
+ oncollapse="window.status='collapsedNode: '+event.collapsedNode"
+ dropListener="#{treeDndBean.onDrop}"
+ dragListener="#{treeDndBean.onDrag}"
dragIndicator="treeIndicator"
+ acceptedTypes="treeNode" dragType="treeNode"
rowKeyVar="LTreeKey"
+ var="item" >
+
+ <rich:dndParam name="treeParam" value="leftTree" />
+ </rich:tree>
</rich:column>
<rich:column id="qty" rendered="#{dataTable.r2rendered}">
<h:outputText value="#{detail.qty}" />
Modified: trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp 2008-07-01
12:58:39 UTC (rev 9316)
+++ trunk/test-applications/jsp/src/main/webapp/DataTable/DataTableProperty.jsp 2008-07-01
13:04:33 UTC (rev 9317)
@@ -4,37 +4,58 @@
<%@ taglib
uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="dataTablePropertySubviewID">
- <h:panelGrid columns="2" style="top">
- <h:outputText value="Align:"></h:outputText>
- <h:selectOneMenu value="#{dataTable.align}">
- <f:selectItem itemLabel="center" itemValue="center" />
- <f:selectItem itemLabel="left" itemValue="left" />
- <f:selectItem itemLabel="right " itemValue="right" />
- <a4j:support event="onclick"
reRender="dataTableID"></a4j:support>
- </h:selectOneMenu>
+ <h:panelGrid columns="2" style="top">
+ <h:outputText value="Align:"></h:outputText>
+ <h:selectOneMenu value="#{dataTable.align}">
+ <f:selectItem itemLabel="center" itemValue="center" />
+ <f:selectItem itemLabel="left" itemValue="left" />
+ <f:selectItem itemLabel="right " itemValue="right" />
+ <a4j:support event="onclick"
reRender="dataTableID"></a4j:support>
+ </h:selectOneMenu>
- <h:outputText value="Border: "></h:outputText>
- <h:inputText value="#{dataTable.border}">
- <a4j:support event="onchange"
reRender="dataTableID"></a4j:support>
- </h:inputText>
+ <h:outputText value="Border: "></h:outputText>
+ <h:inputText value="#{dataTable.border}">
+ <a4j:support event="onchange"
reRender="dataTableID"></a4j:support>
+ </h:inputText>
- <h:outputText value="Columns Width: "></h:outputText>
- <h:inputText value="#{dataTable.columnsWidth}">
- <a4j:support event="onchange"
reRender="dataTableID"></a4j:support>
- </h:inputText>
+ <h:outputText value="Columns Width: "></h:outputText>
+ <h:inputText value="#{dataTable.columnsWidth}">
+ <a4j:support event="onchange"
reRender="dataTableID"></a4j:support>
+ </h:inputText>
- <h:outputText value="Width: "></h:outputText>
- <h:inputText value="#{dataTable.width}">
- <a4j:support event="onchange"
reRender="dataTableID"></a4j:support>
- </h:inputText>
+ <h:outputText value="Width: "></h:outputText>
+ <h:inputText value="#{dataTable.width}">
+ <a4j:support event="onchange"
reRender="dataTableID"></a4j:support>
+ </h:inputText>
- <h:outputText value="rendered:" />
- <h:selectBooleanCheckbox value="#{dataTable.rendered}"
onclick="submit();" />
+ <h:outputText value="rendered:" />
+ <h:selectBooleanCheckbox value="#{dataTable.rendered}"
+ onclick="submit();" />
- <h:outputText value=" row 2 rendered" />
- <h:selectBooleanCheckbox value="#{dataTable.r2rendered}"
onclick="submit();" />
-
- <h:outputText value="elements:"></h:outputText>
- <h:outputText value="#{testBean.elements}"></h:outputText>
- </h:panelGrid>
+ <h:outputText value=" row 2 rendered" />
+ <h:selectBooleanCheckbox value="#{dataTable.r2rendered}"
+ onclick="submit();" />
+
+ <h:outputText value="elements:"></h:outputText>
+ <h:outputText value="#{testBean.elements}"></h:outputText>
+
+ <h:outputText value="Selected Node: "></h:outputText>
+ <h:outputText escape="false"
+ value="#{treeDndBean.leftSelectedNodeTitle}" id="selectedNodeL"
/>
+
+ <h:outputText value="Selected Node: "></h:outputText>
+ <h:outputText escape="false"
+ value="#{treeDndBean.rightSelectedNodeTitle}" id="selectedNodeR"
/>
+ </h:panelGrid>
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getRowCount"
reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText
value="#{rich:findComponent('dataTableID').rowCount}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file