You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/05/01 01:41:11 UTC

svn commit: r165441 [1/4] - in /incubator/beehive/trunk/netui/test/webapps/drt: coreWeb/databinding/datagrid/misc/jspFunction-sort.jsp testRecorder/config/testRecorder-tests.xml testRecorder/tests/DataGridJspFunctionSortTest.xml testRecorder/tests/DataGridTagIdMonster.xml

Author: ekoneil
Date: Sat Apr 30 16:41:11 2005
New Revision: 165441

URL: http://svn.apache.org/viewcvs?rev=165441&view=rev
Log:
Add a BVT for testing the JSP functions used to determine whether a data grid column is sorted ascending or descending.

BB: self
BVT: NetUI pass


Added:
    incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/datagrid/misc/jspFunction-sort.jsp   (with props)
    incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/DataGridJspFunctionSortTest.xml   (with props)
Modified:
    incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
    incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/DataGridTagIdMonster.xml

Added: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/datagrid/misc/jspFunction-sort.jsp
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/datagrid/misc/jspFunction-sort.jsp?rev=165441&view=auto
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/datagrid/misc/jspFunction-sort.jsp (added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/datagrid/misc/jspFunction-sort.jsp Sat Apr 30 16:41:11 2005
@@ -0,0 +1,45 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netuidata"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib prefix="datagrid" tagdir="/WEB-INF/tags/org/apache/beehive/netui/test/databinding/tagfiles" %>
+
+<netui-template:template templatePage="../site/template.jsp">
+    <netui-template:setAttribute name="title" value="DataGrid JSP Function Test"/>
+    <netui-template:section name="body">
+    <p>
+    <datagrid:portfolioXmlBean/>
+    <br/>
+    <netuidata:dataGrid dataSource="pageScope.stocks" name="portfolio">
+        <netuidata:header>
+            <netuidata:headerCell headerText="Symbol" sortExpression="symbol" sortHref="jspFunction-sort.jsp"/>
+            <netuidata:headerCell headerText="Price" sortExpression="price"/>
+            <netuidata:headerCell headerText="Web" sortExpression="web"/>
+        </netuidata:header>
+        <netuidata:rows>
+            <netuidata:templateCell sortExpression="symbol">
+                Symbol is '${container.item.symbol}' and is sorted:
+                <c:choose>
+                    <c:when test="${netuidata:isSortedAscending(dataGrid.state.sortModel, 'symbol')}">
+                        <netui:span value="ascending"/>
+                    </c:when>
+                    <c:when test="${netuidata:isSortedDescending(dataGrid.state.sortModel, 'symbol')}">
+                        <netui:span value="descending"/>
+                    </c:when>
+                    <c:otherwise>none</c:otherwise>
+                </c:choose>
+            </netuidata:templateCell>
+            <netuidata:spanCell value="${container.item.price}" sortExpression="price"/>
+            <netuidata:anchorCell href="${container.item.web}" value="${container.item.name}" sortExpression="web">
+                <netui:parameter name="rowid" value="${container.index}"/>
+                <netui:parameter name="symbol" value="${container.item.symbol}"/>
+            </netuidata:anchorCell>
+        </netuidata:rows>
+    </netuidata:dataGrid>
+    <br/>
+    <netui:anchor href="index.jsp">Reset</netui:anchor>
+    <br/>
+    </p>
+    </netui-template:section>
+</netui-template:template>

Propchange: incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/datagrid/misc/jspFunction-sort.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml?rev=165441&r1=165440&r2=165441&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml (original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml Sat Apr 30 16:41:11 2005
@@ -3017,6 +3017,21 @@
          </features>
       </test>
       <test>
+         <name>DataGridJspFunctionSortTest</name>
+         <description>DataGridJspFunctionSortTest</description>
+         <webapp>coreWeb</webapp>
+         <categories>
+            <category>bvt</category>
+            <category>bvt.struts11</category>
+            <category>databinding</category>
+            <category>datagrid</category>
+         </categories>
+         <features>
+            <feature>Databinding</feature>
+            <feature>Data Grid</feature>
+         </features>
+      </test>
+      <test>
          <name>DataGridMessageOverrides</name>
          <description>DataGridMessageOverrides</description>
          <webapp>coreWeb</webapp>