You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2018/05/08 13:36:26 UTC
[royale-asjs] branch develop updated: add databinding,
but with ApplicationDataBinding,
since ViewDataBinding seems to not work right, seems like a bug
This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new a13f8d8 add databinding, but with ApplicationDataBinding, since ViewDataBinding seems to not work right, seems like a bug
a13f8d8 is described below
commit a13f8d8f53eace64239dd5b76b0f088fa5fad3f9
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Tue May 8 15:36:21 2018 +0200
add databinding, but with ApplicationDataBinding, since ViewDataBinding seems to not work right, seems like a bug
---
.../BE0006_Using_Jewel_TextInput_Control.mxml | 23 ++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/examples/blog/BE0006_Using_Jewel_TextInput_Control/src/main/royale/BE0006_Using_Jewel_TextInput_Control.mxml b/examples/blog/BE0006_Using_Jewel_TextInput_Control/src/main/royale/BE0006_Using_Jewel_TextInput_Control.mxml
index 91f821a..53f7a3a 100644
--- a/examples/blog/BE0006_Using_Jewel_TextInput_Control/src/main/royale/BE0006_Using_Jewel_TextInput_Control.mxml
+++ b/examples/blog/BE0006_Using_Jewel_TextInput_Control/src/main/royale/BE0006_Using_Jewel_TextInput_Control.mxml
@@ -18,7 +18,8 @@
-->
<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:j="library://ns.apache.org/royale/jewel">
+ xmlns:j="library://ns.apache.org/royale/jewel"
+ xmlns:js="library://ns.apache.org/royale/basic">
<fx:Style source="../../main/resources/styles.css"/>
@@ -26,24 +27,38 @@
<![CDATA[
private function textChanged(event:Event):void
{
- result.text = "The textinput text value is: " + text_ti.text;
+ result.text = "The textinput text value is: " + textinput.text;
}
]]>
</fx:Script>
+ <j:beads>
+ <js:ApplicationDataBinding />
+ </j:beads>
+
<j:initialView>
<j:View>
<j:beads>
<j:VerticalLayoutWithPaddingAndGap gap="10"/>
</j:beads>
- <j:TextInput id="text_ti" change="textChanged(event)">
+ <j:Label text="Respond to changes in the text property of a Jewel TextInput"/>
+
+ <j:TextInput id="textinput" change="textChanged(event)">
<j:beads>
- <j:TextPromptBead prompt="Change the text value"/>
+ <j:TextPromptBead prompt="Using change event"/>
</j:beads>
</j:TextInput>
<j:Label id="result" text="The textinput text value is: "/>
+
+ <j:TextInput id="databinding_ti">
+ <j:beads>
+ <j:TextPromptBead prompt="Using databinding"/>
+ </j:beads>
+ </j:TextInput>
+
+ <j:Label text="The textinput text value is: {databinding_ti.text}"/>
</j:View>
</j:initialView>
--
To stop receiving notification emails like this one, please contact
carlosrovira@apache.org.