You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by wkoch <wa...@boeing.com> on 2020/10/02 21:56:34 UTC

How do i get a simple list to bind?

I'm struggling with the basics here.  I'm used to Flex and I think this PAYG
is messing me up.  I read about databinding and tried a bunch of stuff with
no luck.  Given this simple code --  I expected the List to be populated
with data but it's not.  What am I missing?

<?xml version="1.0" encoding="utf-8"?>
<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  xmlns:j="library://ns.apache.org/royale/jewel"
  xmlns:js="library://ns.apache.org/royale/basic" 
  xmlns:html="library://ns.apache.org/royale/html"
  xmlns:local="*"
  initialize="appInit()">
<fx:Style source="resources/app-styles.css"/>
<js:ApplicationDataBinding />
<js:ContainerDataBinding />
<js:ViewDataBinding/>

<fx:Script>
	
</fx:Script>
<j:valuesImpl>
<js:SimpleCSSValuesImpl />
</j:valuesImpl>
<j:initialView>
	<js:View x="10" y="5">
		<j:List localId="list1" width="200" height="300"  y="200" 
dataProvider="{simple}" />
	</js:View>
</j:initialView>
</j:Application>



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: [EXTERNAL] Re: How do i get a simple list to bind?

Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Warren,

I have created based on your code example with databinding [1] - I have
used Moonshine 3.0.0 - Nightly and newest Royale Nightly 0.9.8 build 2245.
Please take example, analyze it, change it etc. Let's work based on
something.

Once you change it let me know what does not working for you.

[1] https://1drv.ms/u/s!ApVpLyjpHDC2irRfL5Aub1USD2NMOw?e=rmqOAN

Thanks,
Piotr

pon., 5 paź 2020 o 10:27 Carlos Rovira <ca...@apache.org> napisał(a):

> Hi Warren
>
> Your example is fully working in my local (compiling and running). So
> since it is not a problem with your code I guess you have something wrong
> in your project config.
> Maybe you miss some library dependency? (registerClassAlias requires
> Reflection)
>
> Aside from that this line doesn't have sense to me:
>
> registerClassAlias('org.apache.royale.collections.ArrayList', ArrayList);:
>
> In case you are using AMF what you need to use is:
>
> /**
> * Register ArrayCollection alias to map to ArrayList
> */
> public function setUp():void
> {
> registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
> }
>
> Since BlazeDS and other server side AMF backend libraries has
> ArrayCollection as the AS3 class type they must use, so we need to change
> in Royale when using ArrayList to map correctly
>
>
> El dom., 4 oct. 2020 a las 21:27, wkoch (<wa...@boeing.com>)
> escribió:
>
>> I appreciate you looking at this.  I've attached a text file of the code,
>> the
>> compiler options, and the compiler build.  I did add a combobox just to
>> see
>> if it would bind.  Nope it won't bind either.
>> JewelExampleJS2.txt
>> <
>> http://apache-royale-users.20374.n8.nabble.com/file/t177/JewelExampleJS2.txt>
>>
>> .
>>
>> If that's not what you meant by the whole file let me know.
>>
>> Thanks!!!!
>>
>>
>>
>> --
>> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

-- 

Piotr Zarzycki

Re: [EXTERNAL] Re: How do i get a simple list to bind?

Posted by Carlos Rovira <ca...@apache.org>.
Hi Warren,

you had this wrong line:

registerClassAlias('org.apache.royale.collections.ArrayList', ArrayList);

that has no sense. The right one you shuold use:

registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);

Since you want to use ArrayList with Jewel.

If you were using emulation (instead of Jewel), you want to use
ArrayCollection (instead of ArrayList), so no line is needed.

HTH





El jue., 8 oct. 2020 a las 14:40, wkoch (<wa...@boeing.com>)
escribió:

> Follow-up to the issue.
>
> I removed the registerClassAlias("flex.messaging.io.ArrayCollection",
> ArrayList);.  I had read somewhere I needed it -- my mistake.
>
> I put my code into a brand new project and rebuilt everything (including
> the
> files on my web server).
>
> Now it binds as expected.  I'm guessing Carlos was right and something
> somewhere went bad causing it to fail silently.
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>


-- 
Carlos Rovira
Apache Member & Apache Royale PMC
*Apache Software Foundation*
http://about.me/carlosrovira

Re: [EXTERNAL] Re: How do i get a simple list to bind?

Posted by wkoch <wa...@boeing.com>.
Follow-up to the issue.

I removed the registerClassAlias("flex.messaging.io.ArrayCollection",
ArrayList);.  I had read somewhere I needed it -- my mistake.

I put my code into a brand new project and rebuilt everything (including the
files on my web server).

Now it binds as expected.  I'm guessing Carlos was right and something
somewhere went bad causing it to fail silently.



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: [EXTERNAL] Re: How do i get a simple list to bind?

Posted by Carlos Rovira <ca...@apache.org>.
Hi Warren

Your example is fully working in my local (compiling and running). So since
it is not a problem with your code I guess you have something wrong in your
project config.
Maybe you miss some library dependency? (registerClassAlias requires
Reflection)

Aside from that this line doesn't have sense to me:

registerClassAlias('org.apache.royale.collections.ArrayList', ArrayList);:

In case you are using AMF what you need to use is:

/**
* Register ArrayCollection alias to map to ArrayList
*/
public function setUp():void
{
registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
}

Since BlazeDS and other server side AMF backend libraries has
ArrayCollection as the AS3 class type they must use, so we need to change
in Royale when using ArrayList to map correctly


El dom., 4 oct. 2020 a las 21:27, wkoch (<wa...@boeing.com>)
escribió:

> I appreciate you looking at this.  I've attached a text file of the code,
> the
> compiler options, and the compiler build.  I did add a combobox just to see
> if it would bind.  Nope it won't bind either.
> JewelExampleJS2.txt
> <
> http://apache-royale-users.20374.n8.nabble.com/file/t177/JewelExampleJS2.txt>
>
> .
>
> If that's not what you meant by the whole file let me know.
>
> Thanks!!!!
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Re: [EXTERNAL] Re: How do i get a simple list to bind?

Posted by wkoch <wa...@boeing.com>.
I appreciate you looking at this.  I've attached a text file of the code, the
compiler options, and the compiler build.  I did add a combobox just to see
if it would bind.  Nope it won't bind either.
JewelExampleJS2.txt
<http://apache-royale-users.20374.n8.nabble.com/file/t177/JewelExampleJS2.txt> 
.

If that's not what you meant by the whole file let me know.

Thanks!!!!



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

Re: [EXTERNAL] Re: How do i get a simple list to bind?

Posted by Carlos Rovira <ca...@apache.org>.
Hi Warren,

binding beads are always assigned to the "whole file" (so to the bead array
of the main tag)
I think there's no bead missing but some other thing interfering, so I
think the best is to copy the whole code of the file to see what could be
the problem

El dom., 4 oct. 2020 a las 18:16, Koch (US), Warren R (<
warren.r.koch@boeing.com>) escribió:

> I did try to work them into my simple example code before I posted for
> help.
>
>
>
> I added the ContainerDataBinding along with the ApplicationDataBinding
> Bead.  Took out the ViewDataBinding.    No Joy.  Did I put the bead in the
> wrong place?
>
>
>
> I tried adding the ConstantBinding to the List1 but I'm guessing I messed
> up the parameters.  Didn't work.
>
> <j:List localId="list1" width="200" height="300"  y="10">
>
>                 <j:beads>
>
>                 <js:ConstantBinding sourceID="simple"
> destinationPropertyName="dataProvider"/>
>
>                 </j:beads>
>
> </j:List>
>
>
>
> I'm positive I'm missing a bead somewhere but I don't see it and I've
> spent hours iterating bead combinations.  I know I'm missing something very
> basic.  Very frustrating.
>
>
>
>
>
>
> *From:* Carlos Rovira [mailto:carlosrovira@apache.org]
> *Sent:* Sunday, October 04, 2020 10:01 AM
> *To:* users@royale.apache.org
> *Subject:* Re: [EXTERNAL] Re: How do i get a simple list to bind?
>
>
>
> This message was sent from outside of Boeing. Please do not click links or
> open attachments unless you recognize the sender and know that the content
> is safe.
>
>
>
>
> Hi Warren,
>
>
>
> about the binding bead I said in my other response : "Also for a View (in
> its own file), you should use <js:ContainerDataBinding/>, instead of
> <js:ViewDataBinding/>, since there's currently a bug that generates lots of
> listeners."
>
>
>
> About Jewel List check these 2 examples:
>
>    - https://royale.apache.org/using-an-item-renderer-with-a-list/
>    - https://royale.apache.org/adding-an-item-to-a-jewel-list/
>
> (or even Tour De Jewel List page)
>
>
>
> also check is reference page for more examples and info about the
> component:
>
>    -
>    https://apache.github.io/royale-docs/component-sets/jewel/list#jewel-list
>
> HTH
>
>
>
> Carlos
>
>
>
>
>
> El sáb., 3 oct. 2020 a las 15:43, Koch (US), Warren R (<
> warren.r.koch@boeing.com>) escribió:
>
> Yes I opened up a bunch of examples and tried to get them to work.  The
> code I included was simplified from the Jewel example.  I have gotten
> binding to work on Label but List refuses to cooperate. And that's why I
> went back to basics and came to this forum.
>
>
>
> I just tried the change Carlos suggested
>
>
>
> <j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>
>                                                    xmlns:j="library://
> ns.apache.org/royale/jewel"
>
>                                                    xmlns:js="library://
> ns.apache.org/royale/basic"
>
>                                                    xmlns:html="library://
> ns.apache.org/royale/html"
>
>                                                    xmlns:local="*"
>
>                                                    initialize="appInit()">
>
>                 <j:beads>
>
>                     <js:ApplicationDataBinding />
>
>                     <js:ContainerDataBinding />
>
>                 </j:beads>
>
>
>
> and it won't bind.  The List is empty.
>
>
>
> I added in under my View
>
>
>
> <js:beads>
>
> <js:ViewDataBinding />
>
> </js:beads>
>
>
>
> and it won't bind.  The List is empty.
>
>
>
> *From:* Piotr Zarzycki [mailto:piotrzarzycki21@gmail.com]
> *Sent:* Saturday, October 03, 2020 5:00 AM
> *To:* users@royale.apache.org
> *Subject:* [EXTERNAL] Re: How do i get a simple list to bind?
>
>
>
> This message was sent from outside of Boeing. Please do not click links or
> open attachments unless you recognize the sender and know that the content
> is safe.
>
>
>
>
> Did you open any example from Royale and just build? Literally almost all
> examples are using somehow databinding.
>
>
>
> On Sat, Oct 3, 2020, 12:50 AM Carlos Rovira <ca...@apache.org>
> wrote:
>
> Just use
>
>
>
> <js:ApplicationDataBinding />
>
>
>
> but remember is a bead ;)
>
>
>
> so:
>
>
>
> <j:beads>
>
>     <js:ApplicationDataBinding />
>
> </j:beads>
>
>
>
> Also for a View (in its own file), you should use
> <js:ContainerDataBinding/>, instead of <js:ViewDataBinding/>, since there's
> currently a bug that generates lots of listeners.
>
>
>
>
>
>
>
>
>
> El vie., 2 oct. 2020 a las 23:56, wkoch (<wa...@boeing.com>)
> escribió:
>
> I'm struggling with the basics here.  I'm used to Flex and I think this
> PAYG
> is messing me up.  I read about databinding and tried a bunch of stuff with
> no luck.  Given this simple code --  I expected the List to be populated
> with data but it's not.  What am I missing?
>
> <?xml version="1.0" encoding="utf-8"?>
> <j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>   xmlns:j="library://ns.apache.org/royale/jewel"
>   xmlns:js="library://ns.apache.org/royale/basic"
>   xmlns:html="library://ns.apache.org/royale/html"
>   xmlns:local="*"
>   initialize="appInit()">
> <fx:Style source="resources/app-styles.css"/>
> <js:ApplicationDataBinding />
> <js:ContainerDataBinding />
> <js:ViewDataBinding/>
>
> <fx:Script>
>
> </fx:Script>
> <j:valuesImpl>
> <js:SimpleCSSValuesImpl />
> </j:valuesImpl>
> <j:initialView>
>         <js:View x="10" y="5">
>                 <j:List localId="list1" width="200" height="300"  y="200"
> dataProvider="{simple}" />
>         </js:View>
> </j:initialView>
> </j:Application>
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira

RE: [EXTERNAL] Re: How do i get a simple list to bind?

Posted by "Koch (US), Warren R" <wa...@boeing.com>.
I did try to work them into my simple example code before I posted for help.

I added the ContainerDataBinding along with the ApplicationDataBinding Bead.  Took out the ViewDataBinding.    No Joy.  Did I put the bead in the wrong place?

I tried adding the ConstantBinding to the List1 but I'm guessing I messed up the parameters.  Didn't work.
<j:List localId="list1" width="200" height="300"  y="10">
                <j:beads>
                <js:ConstantBinding sourceID="simple" destinationPropertyName="dataProvider"/>
                </j:beads>
</j:List>

I'm positive I'm missing a bead somewhere but I don't see it and I've spent hours iterating bead combinations.  I know I'm missing something very basic.  Very frustrating.


From: Carlos Rovira [mailto:carlosrovira@apache.org]
Sent: Sunday, October 04, 2020 10:01 AM
To: users@royale.apache.org
Subject: Re: [EXTERNAL] Re: How do i get a simple list to bind?


This message was sent from outside of Boeing. Please do not click links or open attachments unless you recognize the sender and know that the content is safe.




Hi Warren,

about the binding bead I said in my other response : "Also for a View (in its own file), you should use <js:ContainerDataBinding/>, instead of <js:ViewDataBinding/>, since there's currently a bug that generates lots of listeners."

About Jewel List check these 2 examples:

  *   https://royale.apache.org/using-an-item-renderer-with-a-list/
  *   https://royale.apache.org/adding-an-item-to-a-jewel-list/
(or even Tour De Jewel List page)

also check is reference page for more examples and info about the component:

  *   https://apache.github.io/royale-docs/component-sets/jewel/list#jewel-list
HTH

Carlos


El sáb., 3 oct. 2020 a las 15:43, Koch (US), Warren R (<wa...@boeing.com>>) escribió:
Yes I opened up a bunch of examples and tried to get them to work.  The code I included was simplified from the Jewel example.  I have gotten binding to work on Label but List refuses to cooperate. And that's why I went back to basics and came to this forum.

I just tried the change Carlos suggested

<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                   xmlns:j="library://ns.apache.org/royale/jewel<http://ns.apache.org/royale/jewel>"
                                                   xmlns:js="library://ns.apache.org/royale/basic<http://ns.apache.org/royale/basic>"
                                                   xmlns:html="library://ns.apache.org/royale/html<http://ns.apache.org/royale/html>"
                                                   xmlns:local="*"
                                                   initialize="appInit()">
                <j:beads>
                    <js:ApplicationDataBinding />
                    <js:ContainerDataBinding />
                </j:beads>

and it won't bind.  The List is empty.

I added in under my View

<js:beads>
<js:ViewDataBinding />
</js:beads>

and it won't bind.  The List is empty.

From: Piotr Zarzycki [mailto:piotrzarzycki21@gmail.com<ma...@gmail.com>]
Sent: Saturday, October 03, 2020 5:00 AM
To: users@royale.apache.org<ma...@royale.apache.org>
Subject: [EXTERNAL] Re: How do i get a simple list to bind?


This message was sent from outside of Boeing. Please do not click links or open attachments unless you recognize the sender and know that the content is safe.




Did you open any example from Royale and just build? Literally almost all examples are using somehow databinding.

On Sat, Oct 3, 2020, 12:50 AM Carlos Rovira <ca...@apache.org>> wrote:
Just use

<js:ApplicationDataBinding />

but remember is a bead ;)

so:

<j:beads>
    <js:ApplicationDataBinding />
</j:beads>

Also for a View (in its own file), you should use <js:ContainerDataBinding/>, instead of <js:ViewDataBinding/>, since there's currently a bug that generates lots of listeners.




El vie., 2 oct. 2020 a las 23:56, wkoch (<wa...@boeing.com>>) escribió:
I'm struggling with the basics here.  I'm used to Flex and I think this PAYG
is messing me up.  I read about databinding and tried a bunch of stuff with
no luck.  Given this simple code --  I expected the List to be populated
with data but it's not.  What am I missing?

<?xml version="1.0" encoding="utf-8"?>
<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  xmlns:j="library://ns.apache.org/royale/jewel<http://ns.apache.org/royale/jewel>"
  xmlns:js="library://ns.apache.org/royale/basic<http://ns.apache.org/royale/basic>"
  xmlns:html="library://ns.apache.org/royale/html<http://ns.apache.org/royale/html>"
  xmlns:local="*"
  initialize="appInit()">
<fx:Style source="resources/app-styles.css"/>
<js:ApplicationDataBinding />
<js:ContainerDataBinding />
<js:ViewDataBinding/>

<fx:Script>

</fx:Script>
<j:valuesImpl>
<js:SimpleCSSValuesImpl />
</j:valuesImpl>
<j:initialView>
        <js:View x="10" y="5">
                <j:List localId="list1" width="200" height="300"  y="200"
dataProvider="{simple}" />
        </js:View>
</j:initialView>
</j:Application>



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


--
Carlos Rovira
http://about.me/carlosrovira



--
Carlos Rovira
http://about.me/carlosrovira


Re: [EXTERNAL] Re: How do i get a simple list to bind?

Posted by Carlos Rovira <ca...@apache.org>.
Hi Warren,

about the binding bead I said in my other response : "Also for a View (in
its own file), you should use <js:ContainerDataBinding/>, instead of
<js:ViewDataBinding/>, since there's currently a bug that generates lots of
listeners."

About Jewel List check these 2 examples:

   - https://royale.apache.org/using-an-item-renderer-with-a-list/
   - https://royale.apache.org/adding-an-item-to-a-jewel-list/

(or even Tour De Jewel List page)

also check is reference page for more examples and info about the component:

   -
   https://apache.github.io/royale-docs/component-sets/jewel/list#jewel-list

HTH

Carlos


El sáb., 3 oct. 2020 a las 15:43, Koch (US), Warren R (<
warren.r.koch@boeing.com>) escribió:

> Yes I opened up a bunch of examples and tried to get them to work.  The
> code I included was simplified from the Jewel example.  I have gotten
> binding to work on Label but List refuses to cooperate. And that's why I
> went back to basics and came to this forum.
>
>
>
> I just tried the change Carlos suggested
>
>
>
> <j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>
>                                                    xmlns:j="library://
> ns.apache.org/royale/jewel"
>
>                                                    xmlns:js="library://
> ns.apache.org/royale/basic"
>
>                                                    xmlns:html="library://
> ns.apache.org/royale/html"
>
>                                                    xmlns:local="*"
>
>                                                    initialize="appInit()">
>
>                 <j:beads>
>
>                     <js:ApplicationDataBinding />
>
>                     <js:ContainerDataBinding />
>
>                 </j:beads>
>
>
>
> and it won't bind.  The List is empty.
>
>
>
> I added in under my View
>
>
>
> <js:beads>
>
> <js:ViewDataBinding />
>
> </js:beads>
>
>
>
> and it won't bind.  The List is empty.
>
>
>
> *From:* Piotr Zarzycki [mailto:piotrzarzycki21@gmail.com]
> *Sent:* Saturday, October 03, 2020 5:00 AM
> *To:* users@royale.apache.org
> *Subject:* [EXTERNAL] Re: How do i get a simple list to bind?
>
>
>
> This message was sent from outside of Boeing. Please do not click links or
> open attachments unless you recognize the sender and know that the content
> is safe.
>
>
>
>
> Did you open any example from Royale and just build? Literally almost all
> examples are using somehow databinding.
>
>
>
> On Sat, Oct 3, 2020, 12:50 AM Carlos Rovira <ca...@apache.org>
> wrote:
>
> Just use
>
>
>
> <js:ApplicationDataBinding />
>
>
>
> but remember is a bead ;)
>
>
>
> so:
>
>
>
> <j:beads>
>
>     <js:ApplicationDataBinding />
>
> </j:beads>
>
>
>
> Also for a View (in its own file), you should use
> <js:ContainerDataBinding/>, instead of <js:ViewDataBinding/>, since there's
> currently a bug that generates lots of listeners.
>
>
>
>
>
>
>
>
>
> El vie., 2 oct. 2020 a las 23:56, wkoch (<wa...@boeing.com>)
> escribió:
>
> I'm struggling with the basics here.  I'm used to Flex and I think this
> PAYG
> is messing me up.  I read about databinding and tried a bunch of stuff with
> no luck.  Given this simple code --  I expected the List to be populated
> with data but it's not.  What am I missing?
>
> <?xml version="1.0" encoding="utf-8"?>
> <j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>   xmlns:j="library://ns.apache.org/royale/jewel"
>   xmlns:js="library://ns.apache.org/royale/basic"
>   xmlns:html="library://ns.apache.org/royale/html"
>   xmlns:local="*"
>   initialize="appInit()">
> <fx:Style source="resources/app-styles.css"/>
> <js:ApplicationDataBinding />
> <js:ContainerDataBinding />
> <js:ViewDataBinding/>
>
> <fx:Script>
>
> </fx:Script>
> <j:valuesImpl>
> <js:SimpleCSSValuesImpl />
> </j:valuesImpl>
> <j:initialView>
>         <js:View x="10" y="5">
>                 <j:List localId="list1" width="200" height="300"  y="200"
> dataProvider="{simple}" />
>         </js:View>
> </j:initialView>
> </j:Application>
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
>
>
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

RE: [EXTERNAL] Re: How do i get a simple list to bind?

Posted by "Koch (US), Warren R" <wa...@boeing.com>.
Yes I opened up a bunch of examples and tried to get them to work.  The code I included was simplified from the Jewel example.  I have gotten binding to work on Label but List refuses to cooperate. And that's why I went back to basics and came to this forum.

I just tried the change Carlos suggested

<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                   xmlns:j="library://ns.apache.org/royale/jewel"
                                                   xmlns:js="library://ns.apache.org/royale/basic"
                                                   xmlns:html="library://ns.apache.org/royale/html"
                                                   xmlns:local="*"
                                                   initialize="appInit()">
                <j:beads>
                    <js:ApplicationDataBinding />
                    <js:ContainerDataBinding />
                </j:beads>

and it won't bind.  The List is empty.

I added in under my View

<js:beads>
<js:ViewDataBinding />
</js:beads>

and it won't bind.  The List is empty.

From: Piotr Zarzycki [mailto:piotrzarzycki21@gmail.com]
Sent: Saturday, October 03, 2020 5:00 AM
To: users@royale.apache.org
Subject: [EXTERNAL] Re: How do i get a simple list to bind?


This message was sent from outside of Boeing. Please do not click links or open attachments unless you recognize the sender and know that the content is safe.




Did you open any example from Royale and just build? Literally almost all examples are using somehow databinding.

On Sat, Oct 3, 2020, 12:50 AM Carlos Rovira <ca...@apache.org>> wrote:
Just use

<js:ApplicationDataBinding />

but remember is a bead ;)

so:

<j:beads>
    <js:ApplicationDataBinding />
</j:beads>

Also for a View (in its own file), you should use <js:ContainerDataBinding/>, instead of <js:ViewDataBinding/>, since there's currently a bug that generates lots of listeners.




El vie., 2 oct. 2020 a las 23:56, wkoch (<wa...@boeing.com>>) escribió:
I'm struggling with the basics here.  I'm used to Flex and I think this PAYG
is messing me up.  I read about databinding and tried a bunch of stuff with
no luck.  Given this simple code --  I expected the List to be populated
with data but it's not.  What am I missing?

<?xml version="1.0" encoding="utf-8"?>
<j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  xmlns:j="library://ns.apache.org/royale/jewel<http://ns.apache.org/royale/jewel>"
  xmlns:js="library://ns.apache.org/royale/basic<http://ns.apache.org/royale/basic>"
  xmlns:html="library://ns.apache.org/royale/html<http://ns.apache.org/royale/html>"
  xmlns:local="*"
  initialize="appInit()">
<fx:Style source="resources/app-styles.css"/>
<js:ApplicationDataBinding />
<js:ContainerDataBinding />
<js:ViewDataBinding/>

<fx:Script>

</fx:Script>
<j:valuesImpl>
<js:SimpleCSSValuesImpl />
</j:valuesImpl>
<j:initialView>
        <js:View x="10" y="5">
                <j:List localId="list1" width="200" height="300"  y="200"
dataProvider="{simple}" />
        </js:View>
</j:initialView>
</j:Application>



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


--
Carlos Rovira
http://about.me/carlosrovira


Re: How do i get a simple list to bind?

Posted by Piotr Zarzycki <pi...@gmail.com>.
Did you open any example from Royale and just build? Literally almost all
examples are using somehow databinding.

On Sat, Oct 3, 2020, 12:50 AM Carlos Rovira <ca...@apache.org> wrote:

> Just use
>
> <js:ApplicationDataBinding />
>
> but remember is a bead ;)
>
> so:
>
> <j:beads>
>     <js:ApplicationDataBinding />
> </j:beads>
>
> Also for a View (in its own file), you should use
> <js:ContainerDataBinding/>, instead of <js:ViewDataBinding/>, since there's
> currently a bug that generates lots of listeners.
>
>
>
>
> El vie., 2 oct. 2020 a las 23:56, wkoch (<wa...@boeing.com>)
> escribió:
>
>> I'm struggling with the basics here.  I'm used to Flex and I think this
>> PAYG
>> is messing me up.  I read about databinding and tried a bunch of stuff
>> with
>> no luck.  Given this simple code --  I expected the List to be populated
>> with data but it's not.  What am I missing?
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>>   xmlns:j="library://ns.apache.org/royale/jewel"
>>   xmlns:js="library://ns.apache.org/royale/basic"
>>   xmlns:html="library://ns.apache.org/royale/html"
>>   xmlns:local="*"
>>   initialize="appInit()">
>> <fx:Style source="resources/app-styles.css"/>
>> <js:ApplicationDataBinding />
>> <js:ContainerDataBinding />
>> <js:ViewDataBinding/>
>>
>> <fx:Script>
>>
>> </fx:Script>
>> <j:valuesImpl>
>> <js:SimpleCSSValuesImpl />
>> </j:valuesImpl>
>> <j:initialView>
>>         <js:View x="10" y="5">
>>                 <j:List localId="list1" width="200" height="300"  y="200"
>> dataProvider="{simple}" />
>>         </js:View>
>> </j:initialView>
>> </j:Application>
>>
>>
>>
>> --
>> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

Re: How do i get a simple list to bind?

Posted by Carlos Rovira <ca...@apache.org>.
Just use

<js:ApplicationDataBinding />

but remember is a bead ;)

so:

<j:beads>
    <js:ApplicationDataBinding />
</j:beads>

Also for a View (in its own file), you should use
<js:ContainerDataBinding/>, instead of <js:ViewDataBinding/>, since there's
currently a bug that generates lots of listeners.




El vie., 2 oct. 2020 a las 23:56, wkoch (<wa...@boeing.com>)
escribió:

> I'm struggling with the basics here.  I'm used to Flex and I think this
> PAYG
> is messing me up.  I read about databinding and tried a bunch of stuff with
> no luck.  Given this simple code --  I expected the List to be populated
> with data but it's not.  What am I missing?
>
> <?xml version="1.0" encoding="utf-8"?>
> <j:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>   xmlns:j="library://ns.apache.org/royale/jewel"
>   xmlns:js="library://ns.apache.org/royale/basic"
>   xmlns:html="library://ns.apache.org/royale/html"
>   xmlns:local="*"
>   initialize="appInit()">
> <fx:Style source="resources/app-styles.css"/>
> <js:ApplicationDataBinding />
> <js:ContainerDataBinding />
> <js:ViewDataBinding/>
>
> <fx:Script>
>
> </fx:Script>
> <j:valuesImpl>
> <js:SimpleCSSValuesImpl />
> </j:valuesImpl>
> <j:initialView>
>         <js:View x="10" y="5">
>                 <j:List localId="list1" width="200" height="300"  y="200"
> dataProvider="{simple}" />
>         </js:View>
> </j:initialView>
> </j:Application>
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>


-- 
Carlos Rovira
http://about.me/carlosrovira