Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 804401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:54:48+00:00 2026-05-14T23:54:48+00:00

I’m having some troubles with binding data. I have an application that contains a

  • 0

I’m having some troubles with binding data.

I have an application that contains a viewstack of components.
Let’s say I have comp1, comp2 and comp3 inside the viewstack.
Each component, has its own data class –> comp1Data.as, comp2Data.as and comp3Data.as.
All values in each component are binded to the corresponding data in it’s data object.

A click in a control in comp1 leads to comp3, the same goes for comp2. Clicking a control in comp2 leads to comp3.
When going from comp1 to comp3, comp3Data.as is initialized and and comp3 displays the binded values.
When going from comp2 to comp3, comp3Data.as is also initialized but the binded values are not displayed…

I tried using an initialize but it is not working. And when debugging, the data is right there, but it’s is not displaying.

Any help would be really appreciated.
Regards,

BS_C3


Some code ^__^
Main application:

<mx:Application>
    <mx:Script>
        <![CDATA[
            private function order(s:String):void
            {
                if(s == 'order')
                    OrderData.instance.state = 'order';
                else if(s == 'reporting')
                {
                    OrderData.instance.state = 'reporting';
                    .
                    .
                    .

                }
                pages.selectedChild = or;
            }
        ]]>
    </mx:Script>

    <mx:ViewStack id="pages" horizontalCenter="0" verticalCenter="0" width="100%" height="100%">
        <components:SearchResult id="sr" width="100%"
            order="order('order')"
            />
        <components:Reporting id="rp" width="100%"
            reportingOrder="order('reporting')"/>
        <components:Order id="or" width="100%"
            />
    </mx:ViewStack>
</mx:Application>

Both SearchResult and Reporting acces Order.

Order.mxml looks like this:

<mx:Canvas>
    <mx:HBox width="100%">
        <mx:Box paddingBottom="15" paddingLeft="15" paddingRight="15" paddingTop="15" backgroundColor="#FFFFFF" height="100%">
            <components:OrderView id="ov"/>
        </mx:Box>   
        <mx:Spacer width="15"/>
        <components:OrderedSDR id="sdr" height="100%"/>     
    </mx:HBox>
</mx:Canvas>

I’m getting troubles with OrderedSDR.mxml:

<mx:Canvas>
    <mx:VBox width="100%" height="100%" paddingBottom="28" paddingLeft="28" paddingRight="28" paddingTop="28" backgroundColor="#FFFFFF">
        <mx:HBox width="100%" paddingBottom="6" horizontalAlign="center">
            <mx:Canvas>
                <mx:Image id="thumbnailBG" source="@Embed(source='assets/Images/SearchResult/BoxBagueOverview.PNG')"/>              
                <mx:Image id="overview" source="{GlobalData.instance.collection.overview.toString()}"/>
                <mx:Label id="thumbnailCarats" 
                    text="{GlobalData.instance.collection.carats.toString() + GlobalData.instance.languageProperties.orderedSDR.imageInfo.toString()}"
                    styleName="OVLBL"
                    paddingBottom="5" paddingRight="10"
                    x="{thumbnailBG.x + thumbnailBG.width - thumbnailCarats.width}"
                    y="{thumbnailBG.y + thumbnailBG.height - thumbnailCarats.height}"/>
            </mx:Canvas>
        </mx:HBox>
        <mx:VBox id="mainBox" paddingBottom="8" paddingTop="8" verticalGap="6" width="180">
            <mx:HBox width="100%" height="13">
                <mx:Label width="80" 
                    text="{GlobalData.instance.languageProperties.orderedSDR.product.toString()}" 
                    styleName="OVDataLbl" opaqueBackground="#ECE5E2"/>
                <mx:Label text="{SearchResultData.instance.selectedSDR.matnr_fp}" styleName="OVData"/>
            </mx:HBox>

        <mx:HBox width="100%" height="13">
            <mx:Label width="80" 
                text="{GlobalData.instance.languageProperties.orderedSDR.netPrice.toString()}" 
                styleName="OVDataLbl" opaqueBackground="#ECE5E2"/>
            <mx:Label text="{SearchResultData.instance.selectedSDR.currSymbol + ' ' + SearchResultData.instance.selectedSDR.fNet_price_fp}" styleName="OVData"/>
        </mx:HBox>

            .
            .
            .
        </mx:VBox>
    </mx:VBox>
</mx:Canvas>

Inside mainBox, I’ve got a list of hbox with the same structure as shown in the first two Hboxes.

Regarding the datasources, these are the following datasources that I’m using, their expected behaviour and their actual behaviour:

@

Embed(source='assets/Images/SearchResult/BoxBagueOverview.PNG --> The image is displayed as it should

GlobalData.instance.collection.overview.toString() --> GlobalData.instance.collection is a XMLList that contains the data for the image with id="overview". I do get the correct source, but the image is not displayed.

GlobalData.instance.languageProperties. ... --> It's a XMLList. The data is shown as it should.

SearchResultData.instance.selectedSDR.matnr_fp --> SearchResultData.instance.selectedSDR is an object that contains all the data that has to be displayed. Matnr_fp is a property of this object. And each hbox inside mainbox have to display a property of the object selectedSDR. The only property that is being displayed is SearchResultData.instance.selectedSDR.currSymbol. The other properties are not displaying even if the datasource is populated.

Hope this will be useful.
Thanks!

Regards,
BS_C3

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:54:49+00:00Added an answer on May 14, 2026 at 11:54 pm

    Looks like nobody’s seen anything wrong with the code??
    Me neither. But doing other modifications on the code, it finally worked. Still don’t know why… >_<

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.