You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by bb...@apache.org on 2006/07/12 19:40:35 UTC

svn commit: r421389 - /incubator/xap/trunk/testsrc/xap/xmodify/xmodifyHTML.xal

Author: bbuffone
Date: Wed Jul 12 12:40:35 2006
New Revision: 421389

URL: http://svn.apache.org/viewvc?rev=421389&view=rev
Log:
Checking in the first version of the xModify against the HTML DOM.

Also added and fixed xModify jsunit tests for both 
xmodify against reagular dom and HTML dom

Sample application to test and demo how to use xModify against the 
HTML dom

Added:
    incubator/xap/trunk/testsrc/xap/xmodify/xmodifyHTML.xal   (with props)

Added: incubator/xap/trunk/testsrc/xap/xmodify/xmodifyHTML.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/testsrc/xap/xmodify/xmodifyHTML.xal?rev=421389&view=auto
==============================================================================
--- incubator/xap/trunk/testsrc/xap/xmodify/xmodifyHTML.xal (added)
+++ incubator/xap/trunk/testsrc/xap/xmodify/xmodifyHTML.xal Wed Jul 12 12:40:35 2006
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xal xmlns="http://www.openxal.org/xal" xmlns:xm="http://www.openxal.org/xmodify"> 
+     <xm:modifications document="html">
+         <!--
+             Macro will change the text of all input fields in the browser to Yeppie!
+         -->
+         <xm:set-attribute select="//INPUT[@type='text']">
+             <xm:attribute name="value" value="Yeppie!"/>
+         </xm:set-attribute>
+         
+         <!--
+             Disables all text input fields in the application
+         -->
+         <xm:set-attribute select="//INPUT[@type='text']">
+             <xm:attribute name="test" value="true"/>
+         </xm:set-attribute>
+         
+         <!--
+             Enable all text input fields in the application
+         -->
+         <xm:remove-attribute select="//INPUT[@type='text']">
+             <attribute name="test"/>
+         </xm:remove-attribute>             
+       
+         <!--
+             Macro will remove all the input text and password fields.
+         -->
+         <xm:remove-element select="//INPUT[@type='password']"/>
+         
+         <!--
+             Macro will change the text of all input fields in the browser to Yeppie!
+         -->
+         <xm:remove-element select="//TR[@type='data']"/>
+        
+             <xm:append select="//TABLE[@id='myTable']/TBODY">
+                     <tr type="data">
+                         <td>10</td>
+                         <td>Robert</td>
+                         <td>bbuffone@nexaweb.com</td>
+                         <td>555 Boston Road Boston, MA</td>
+                         <td>555-555-5555</td>
+                         <td>20</td>
+                     </tr>
+                     <tr type="data">
+                         <td>19</td>
+                         <td>Robert</td>
+                         <td>bbuffone@nexaweb.com</td>
+                         <td>555 Boston Road Boston, MA</td>
+                         <td>555-555-5555</td>
+                         <td>20</td>
+                     </tr>
+                     <tr type="data">
+                         <td>18</td>
+                         <td>Robert</td>
+                         <td>bbuffone@nexaweb.com</td>
+                         <td>555 Boston Road Boston, MA</td>
+                         <td>555-555-5555</td>
+                         <td>20</td>
+                     </tr>
+                 </xm:append>
+        
+                 <xm:insert-before select="//TR[@type='insertRow']">
+                     <tr type="data" id="insertBeforeRow">
+                         <td colspan="6">This row was inserted using the insert before modification statement</td>
+                     </tr>
+                 </xm:insert-before>
+         
+                 <xm:insert-after select="//TR[@type='insertRow']">
+                     <tr type="data" id="insertAfterRow">
+                         <td colspan="6">This row was inserted using the insert after modification statement </td>
+                     </tr>
+                 </xm:insert-after>
+        
+         <!--
+             Macros handles the mouse overs for all controls. 
+         --> 
+                <xm:replace select="id('mouseOverArea')">
+                     <div style="100%;width:100%background-color:#ff0000" id="mouseOverArea">
+                         <![CDATA[This button will disable all the fields.]]>
+                     </div>
+                 </xm:replace>
+        
+
+      </xm:modifications>
+</xal>

Propchange: incubator/xap/trunk/testsrc/xap/xmodify/xmodifyHTML.xal
------------------------------------------------------------------------------
    svn:eol-style = native