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 mt...@apache.org on 2006/10/19 19:08:22 UTC
svn commit: r465734 - in /incubator/xap/trunk/WebContent/examples/widgets:
passwordField.xal textArea.html textArea.xal textField.xal
Author: mturyn
Date: Thu Oct 19 12:08:21 2006
New Revision: 465734
URL: http://svn.apache.org/viewvc?view=rev&rev=465734
Log:
Altered for relatively stable versions of base code.
Attempt to set title from textArea.xal; method so far works only for Firefox.
Modified:
incubator/xap/trunk/WebContent/examples/widgets/passwordField.xal
incubator/xap/trunk/WebContent/examples/widgets/textArea.html
incubator/xap/trunk/WebContent/examples/widgets/textArea.xal
incubator/xap/trunk/WebContent/examples/widgets/textField.xal
Modified: incubator/xap/trunk/WebContent/examples/widgets/passwordField.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/passwordField.xal?view=diff&rev=465734&r1=465733&r2=465734
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/passwordField.xal (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/passwordField.xal Thu Oct 19 12:08:21 2006
@@ -43,9 +43,13 @@
'selectable','false')"/>
<xal:button width="200px" height="25px"
- text="Toggle editability"
- onCommand="mco:attributeSetter.toggleBooleanAttribute(testComponent,
- 'editable')"/>
+ text="Editability ON"
+ onCommand="mco:attributeSetter.setAttribute(testComponent,
+ 'editable', 'true')"/>
+ <xal:button width="200px" height="25px"
+ text="Editability OFF"
+ onCommand="mco:attributeSetter.setAttribute(testComponent,
+ 'editable','false')"/>
<!--standard test things -->
Modified: incubator/xap/trunk/WebContent/examples/widgets/textArea.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/textArea.html?view=diff&rev=465734&r1=465733&r2=465734
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/textArea.html (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/textArea.html Thu Oct 19 12:08:21 2006
@@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Dummy title:</title>
+ <title>Text area</title>
<style type="text/css">
<!--
@@ -23,16 +23,17 @@
<script language="JavaScript" type="text/javascript" src="AttributeTester.js"></script>
- <script language="JavaScript">
+ <!-- script language="JavaScript">
Xap._sourceRootDir = "../../" ;
Xap.addDebuggables(
"xap.widgets.dojo.TextArea",
"xap.bridges.dojo.TextAreaBridge",
+ "xap.bridges.dojo.TextFieldBridge",
"xap.bridges.dojo.DojoWidgetBridge",
"xap.xml.xmodify.CommandDirective"
) ;
Xap._loadDebuggables() ;
- </script>
+ </script -->
Modified: incubator/xap/trunk/WebContent/examples/widgets/textArea.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/textArea.xal?view=diff&rev=465734&r1=465733&r2=465734
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/textArea.xal (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/textArea.xal Thu Oct 19 12:08:21 2006
@@ -11,41 +11,13 @@
/>
- <!-- Page title -->
- <xm:modifications document="html">
-
- <!--
- All of the below seem to to change the HTML DOM, but
- window doesn't seem to find out about it---a web search
- indicates that title setting just doesn't work using direct
- manipulation of the DOM...
- -->
-
- <!-- Don't use 'replace' in case there's no title to start-with: -->
- <!-- xm:remove-element select="//HTML/HEAD/TITLE"/ -->
- <!-- xm:append select="//HTML/HEAD">
- <title>Text area testt:</title>
- </xm:append -->
- <!-- xm:replace select="//HTML/HEAD/TITLE">
- <title>Text area testttt:</title>
- </xm:replace -->
-
- <xm:append select="//HTML/HEAD">
- <script> document.title="Text area tests:";</script>
- </xm:append>
- <!--
- Anybody know a way of forcing (in effect)
- an invalidation that would make the window
- look again to the DOM?
- -->
-
- </xm:modifications>
-
<xm:modifications>
<xm:append select="/xal">
- <xal:textArea width="200px" text="A text field"
+ <xal:textArea width="200px" height="100px" text="A text area."
+ editable="true"
id="testComponent" onEdit="mco:attributeSetter.reportEvent(event)"
+ onTextChange="mco:attributeSetter.reportEvent(event)"
/>
@@ -54,16 +26,16 @@
text="text -> 'some new text'"
onCommand="mco:attributeSetter.setAttribute(testComponent,
'text','some new text')"/>
-
+
<xal:button width="200px" height="25px"
- text="Limit to 8 chars."
+ text="Editability ON"
onCommand="mco:attributeSetter.setAttribute(testComponent,
- 'maxLength','8')"/>
-
+ 'editable', 'true')"/>
<xal:button width="200px" height="25px"
- text="...255 chars."
+ text="Editability OFF"
onCommand="mco:attributeSetter.setAttribute(testComponent,
- 'maxLength','255')"/>
+ 'editable','false')"/>
+
<xal:button width="200px" height="25px"
text="Selectability ON"
onCommand="mco:attributeSetter.setAttribute(testComponent,
@@ -71,12 +43,9 @@
<xal:button width="200px" height="25px"
text="Selectability OFF"
onCommand="mco:attributeSetter.setAttribute(testComponent,
- 'selectable','false')"/>
+ 'selectable','false')"/>
- <xal:button width="200px" height="25px"
- text="Toggle editability"
- onCommand="mco:attributeSetter.toggleBooleanAttribute(testComponent,
- 'editable')"/>
+
<!--standard test things -->
@@ -84,4 +53,43 @@
<include href="standardButtons.xal" xmlns="http://www.openxal.org/xinclude"/>
</xm:append>
</xm:modifications>
+
+
+
+ <!-- Page title -->
+ <xm:modifications document="html">
+
+ <!--
+ All of the below seem to to change the HTML DOM, but
+ window doesn't seem to find out about it---a web search
+ indicates that title setting just doesn't work using direct
+ manipulation of the DOM...
+ -->
+
+ <!-- Don't use 'replace' in case there's no title to start-with: -->
+ <!-- xm:remove-element select="//HTML/HEAD/TITLE"/ -->
+ <!-- xm:append select="//HTML/HEAD">
+ <title>Text area testt:</title>
+ </xm:append -->
+ <!--
+ Anybody know a way of forcing (in effect)
+ an invalidation that would make the window
+ look again to the DOM?
+ -->
+
+
+ <xm:append select="//HTML/HEAD">
+ <SCRIPT language="JavaScript"
+ type="text/javascript"
+ id="test"
+ >
+ document.title="Text area tests:";
+ </SCRIPT>
+ </xm:append>
+
+
+
+
+ </xm:modifications>
+
</xal>
Modified: incubator/xap/trunk/WebContent/examples/widgets/textField.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/textField.xal?view=diff&rev=465734&r1=465733&r2=465734
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/textField.xal (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/textField.xal Thu Oct 19 12:08:21 2006
@@ -16,15 +16,6 @@
id="testComponent" onEdit="mco:attributeSetter.reportEvent(event)"
onTextChange="mco:attributeSetter.reportEvent(event)"
/>
-
- <!-- xal:label text="Alphabetic keyboard events:" id="statusLabel"
- color="darkred" height="30px" width="200px"
- fontSize="9pt" alignVertical="bottom" fontWeight="bold"
- />
- <xal:label text="" id="status"
- color="darkred" height="30px"
- fontSize="9pt" alignVertical="top"
- / -->
@@ -55,10 +46,13 @@
'selectable','false')"/>
<xal:button width="200px" height="25px"
- text="Toggle editability"
- onCommand="mco:attributeSetter.toggleBooleanAttribute(testComponent,
- 'editable')"/>
-
+ text="Editability ON"
+ onCommand="mco:attributeSetter.setAttribute(testComponent,
+ 'editable', 'true')"/>
+ <xal:button width="200px" height="25px"
+ text="Editability OFF"
+ onCommand="mco:attributeSetter.setAttribute(testComponent,
+ 'editable','false')"/>