You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by piotrz <pi...@gmail.com> on 2017/02/04 09:40:04 UTC

Re: [FlexJS] Data-binding fails when following multiple references

Hi Sankar,

What's with your binding issue ? Do you still experience it? I don't see any
jira about that.

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59036.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by piotrz <pi...@gmail.com>.
Alex,

He means that he has simple Model in MXML and push array to the component:

<mdl:beads>
		<js:ContainerDataBinding/>
	</mdl:beads>
<mdl:model>
		<models:TablesModel id="tableModel"/>
</mdl:model>
	
	<mdl:Table id="tblMDL" shadow="2" selectable="true" percentWidth="100"
dataProvider={tableModel.materials}"></mdl:Table>

I'm going to look into that today.

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59147.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by Alex Harui <ah...@adobe.com>.

On 2/7/17, 10:56 PM, "sankar" <sa...@gmail.com> wrote:

>piotrz wrote
>> I just resolved your jira. Take a look into the comments and let me know
>> if anything is wrong.
>
>Hi Priotr,
>
>I just looked into. Most of the components now working nicely! Thanks!
>Yet a
>few components missing their bracketed binding ways. If you please take a
>look into my findings at Jira.

What is meant by "bracketed binding"?

Just Curious,
-Alex


Re: [FlexJS] Data-binding fails when following multiple references

Posted by piotrz <pi...@gmail.com>.
Hi Sankar,

I just pushed fix for your failing, but Binding is still something which I
will be looking - probably today.

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59182.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by piotrz <pi...@gmail.com>.
I think I have provided all the fixes. Comments in jira has been added. :)

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59335.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by sankar <sa...@gmail.com>.
Great Piotr,

Thank you! I shall give it a try soon possible!

I'll keep you updated.

Thanks!



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59506.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by piotrz <pi...@gmail.com>.
Sankar,

Build with my fixes is online:
http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs/2009/ 
You can grab it through the installer.

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59485.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by sankar <sa...@gmail.com>.
Hi Piotr,

Sure, if we need to move early (than you fix) we'll probably need to move
with the basic proven way of binding (to tab type of components). But I'm
afraid some of the application here based on rendering dynamic data. Thus
tabs and some other items shall be drawn after data available to the
application. I shall check if BasicBinding can address this requirement than
ConstantBinding.

Thank you, Priotr.



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59278.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by piotrz <pi...@gmail.com>.
Sankar,

If you wanna move forward with your application you can always use data
binding as we show it in example.
It seems that it takes me more time what actually is broken in case od Tabs.

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59232.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by sankar <sa...@gmail.com>.
piotrz wrote
> Put into model only one model and it should work.

Hi Priotr,

I'm okay with adding only one model class in <mdl:model> tag. I also tested
if I declare an external class having data for Table component in
<fx:Script/> tag and then bind to Table component, that does work. 

But Tabs and TabBar component still breaking my application when I tried by
bracketed binding. I tried following codes:

<mdl:GridCell column="1" percentWidth="100">
            <mdl:Tabs width="400" selectedIndex="1" tabIdField="tabId"
labelField="label" className="customTabBarPanelItemRenderer"
dataProvider="{tabsModel.tabs}"/>
        </mdl:GridCell>
       <mdl:GridCell column="1" percentWidth="100">
            <mdl:NavigationLayout width="600">
                <mdl:Header>
                    <mdl:TabBar selectedIndex="0" tabIdField="tabId"
labelField="label" className="customTabBarSetup"
dataProvider="{tabsModel.tabsLayout}"/>
                </mdl:Header>

                <mdl:NavigationLayoutContent>
                    <mdl:TabBarPanel id="starks_panel" isActive="true">
                        <js:Ul>
                            <js:Li><mdl:beads><js:InnerHTML
text="Eddard"/></mdl:beads></js:Li>
                            <js:Li><js:Label text="Catelyn"/></js:Li>
                            <js:Li><js:Label text="Robb"/></js:Li>
                            <js:Li><js:Label text="Sansa"/></js:Li>
                            <js:Li><js:Label text="Brandon"/></js:Li>
                            <js:Li><js:Label text="Arya"/></js:Li>
                            <js:Li><js:Label text="Rickon"/></js:Li>
                        </js:Ul>
                    </mdl:TabBarPanel>

                    <mdl:TabBarPanel id="lannisters_panel">
                        <js:Ul>
                            <js:Li><js:Label text="Tywin"/></js:Li>
                            <js:Li><js:Label text="Cersei"/></js:Li>
                            <js:Li><js:Label text="Jamie"/></js:Li>
                            <js:Li><js:Label text="Tyrion"/></js:Li>
                        </js:Ul>
                    </mdl:TabBarPanel>

                    <mdl:TabBarPanel id="targaryens_panel">
                        <js:Ul>
                            <js:Li><js:Label text="Viserys"/></js:Li>
                            <js:Li><js:Label text="Daenerys"/></js:Li>
                        </js:Ul>
                    </mdl:TabBarPanel>
                </mdl:NavigationLayoutContent>
            </mdl:NavigationLayout>
        </mdl:GridCell>


Can you please take a look, Priotr (?)

Thanks!



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59179.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by Alex Harui <ah...@adobe.com>.

On 2/8/17, 12:17 PM, "piotrz" <pi...@gmail.com> wrote:

>Hi Sankar,
>
>I did look into that. Here where the problem is. We have tag <model> -
>which
>looks like can contains only one model. Once you declare:
>
><mdl:model>
>		<models:TablesModel id="tableModel"/>
>		<models:TabsModel id="tabsModel"/>
></mdl:model>

Seems like there should have been a compiler error here.

-Alex


Re: [FlexJS] Data-binding fails when following multiple references

Posted by piotrz <pi...@gmail.com>.
Hi Sankar,

I did look into that. Here where the problem is. We have tag <model> - which
looks like can contains only one model. Once you declare:

<mdl:model>
		<models:TablesModel id="tableModel"/>
		<models:TabsModel id="tabsModel"/>
</mdl:model>

After compilation only the last one was picked up and put into the strand.
Since you were used the first one Binding was not seen it cause only the
second model exists. 

Put into model only one model and it should work.

<mdl:model>
		<models:TablesModel id="tableModel"/>
</mdl:model>

I'm not sure whether this is bug, but in my opinion it is good that you can
put there only one model. It at some point forces you to build small views
with small pice of data source.

Let me know whether this is working and I will resolve jira.

Thanks,
Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59163.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by sankar <sa...@gmail.com>.
piotrz wrote
> I just resolved your jira. Take a look into the comments and let me know
> if anything is wrong.

Hi Priotr,

I just looked into. Most of the components now working nicely! Thanks! Yet a
few components missing their bracketed binding ways. If you please take a
look into my findings at Jira. 

Thanks!




--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59123.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by piotrz <pi...@gmail.com>.
Hi Sankar,

I just resolved your jira. Take a look into the comments and let me know if
anything is wrong.

Piotr



-----
Apache Flex PMC
piotrzarzycki21@gmail.com
--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59103.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by sankar <sa...@gmail.com>.
Hi Piotr,

I've created a JIRA issue pointing bracketed binding problems to MDL
components. You can find it at here:

https://issues.apache.org/jira/browse/FLEX-35256

Please, take a look.


Thanks!



--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59052.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Re: [FlexJS] Data-binding fails when following multiple references

Posted by sankar <sa...@gmail.com>.
Hi Piotr,

Sorry it's my bad. I was busy lately with other things running here. 

I shall plan to putup a demo with MDL on binding problems. I shall let you
know. 

At present I'm updating recent source from Apache repository.

Thanks!




--
View this message in context: http://apache-flex-development.2333347.n4.nabble.com/FlexJS-Data-binding-fails-when-following-multiple-references-tp58022p59045.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.