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 2007/02/01 20:52:05 UTC
svn commit: r502354 - in
/incubator/xap/trunk/samples/WebContent/examples/html-xmodify: index.html
index.xal xmodify.js
Author: bbuffone
Date: Thu Feb 1 12:52:04 2007
New Revision: 502354
URL: http://svn.apache.org/viewvc?view=rev&rev=502354
Log:
Fixed issue with the macro sample.
Removed:
incubator/xap/trunk/samples/WebContent/examples/html-xmodify/xmodify.js
Modified:
incubator/xap/trunk/samples/WebContent/examples/html-xmodify/index.html
incubator/xap/trunk/samples/WebContent/examples/html-xmodify/index.xal
Modified: incubator/xap/trunk/samples/WebContent/examples/html-xmodify/index.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/html-xmodify/index.html?view=diff&rev=502354&r1=502353&r2=502354
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/html-xmodify/index.html (original)
+++ incubator/xap/trunk/samples/WebContent/examples/html-xmodify/index.html Thu Feb 1 12:52:04 2007
@@ -41,8 +41,15 @@
<script language="JavaScript" type="text/javascript" src="../../xapcore.js"></script>
<script language="JavaScript" type="text/javascript">
+ var myApp = null;
window.onload = function(){
myApp = Xap.createEmbeddedApplications();
+ }
+
+ function executeMacro(macro){
+ var mc = myApp["myApp"].getSession().getMacroContainer();
+ var m = mc.get(macro);
+ m.execute();
}
</script>
Modified: incubator/xap/trunk/samples/WebContent/examples/html-xmodify/index.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/samples/WebContent/examples/html-xmodify/index.xal?view=diff&rev=502354&r1=502353&r2=502354
==============================================================================
--- incubator/xap/trunk/samples/WebContent/examples/html-xmodify/index.xal (original)
+++ incubator/xap/trunk/samples/WebContent/examples/html-xmodify/index.xal Thu Feb 1 12:52:04 2007
@@ -19,10 +19,6 @@
xmlns:mco="http://openxal.org/core/mco" xmlns:macro="http://openxal.org/core/macro"
xmlns:xm="http://openxal.org/core/xmodify">
-
- <mco xmlns="http://openxal.org/core/mco" id="XmodifyMCO" class="XmodifyMCO" src="xmodify.js"/>
-
-
<!--
Macro will change the text of all input fields in the browser to Yeppie!
-->
@@ -162,8 +158,8 @@
Using percentages in a splitter will not work well in IE, it is better to use a
pixel value for splitPosition.
-->
- <label width="0px" height="0px" onCreate="mco:XmodifyMCO.onInit(event)"/>
- <xal:htmlView width="100%" height="100%">
+ <xal:htmlView width="100%" height="100%">
+ <![CDATA[
<div style="valign:top; background-color: #FFFFFF; width: 100%; height: 100%">
<table height="100%" style="width:100%">
<tr>
@@ -254,7 +250,7 @@
<td>
<input type="submit"
value="Change Input Fields"
- onclick="XmodifyMCOObj.executeMacro('changeInputValues')"
+ onclick="executeMacro('changeInputValues')"
/>
</td>
<td width="60%" rowspan="4"
@@ -272,9 +268,9 @@
<td>
<input type="submit"
value="Disable Input Fields"
- onclick="XmodifyMCOObj.executeMacro('disableInputText')"
- onmouseout="XmodifyMCOObj.executeMacro('onmouseout')"
- onmouseover="XmodifyMCOObj.executeMacro('onmouseoverdisable')"
+ onclick="executeMacro('disableInputText')"
+ onmouseout="executeMacro('onmouseout')"
+ onmouseover="executeMacro('onmouseoverdisable')"
/>
</td>
</tr>
@@ -282,7 +278,7 @@
<td>
<input type="submit"
value="Enable Input Fields"
- onclick="XmodifyMCOObj.executeMacro('enableInputText');alert('Can\'t re-enable fields becuase need to set property not attribute')"
+ onclick="executeMacro('enableInputText');alert('Can\'t re-enable fields becuase need to set property not attribute')"
/>
</td>
</tr>
@@ -290,7 +286,7 @@
<td>
<input type="submit"
value="Delete Input Fields"
- onclick="XmodifyMCOObj.executeMacro('removeAllInputFields')"
+ onclick="executeMacro('removeAllInputFields')"
/>
</td>
</tr>
@@ -386,13 +382,13 @@
</td>
<td width="30%" valign="top" align="right">
<input type="submit" value="Clear Table"
- onclick="XmodifyMCOObj.executeMacro('clearTable')"/>
+ onclick="executeMacro('clearTable')"/>
<input type="submit" value="Fill Table"
- onclick="XmodifyMCOObj.executeMacro('fillTable')"/>
+ onclick="executeMacro('fillTable')"/>
<input type="submit" value="Insert Before"
- onclick="XmodifyMCOObj.executeMacro('insertBefore')"/>
+ onclick="executeMacro('insertBefore')"/>
<input type="submit" value="Insert After"
- onclick="XmodifyMCOObj.executeMacro('insertAfter')"
+ onclick="executeMacro('insertAfter')"
/>
</td>
</tr>
@@ -403,6 +399,7 @@
</td>
</tr>
</table>
- </div>
+ </div>
+ ]]>
</xal:htmlView>
</xal>