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 988577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:39:24+00:00 2026-05-16T05:39:24+00:00

I have an value object in Flex which looks like: [Bindable] public class MyVO

  • 0

I have an value object in Flex which looks like:

[Bindable]

public class MyVO
{
    public var a:ArrayCollection;
    public var b:ArrayCollection;
    private var timeSort:Sort;

    public function ShiftVO(){
        timeSort = new Sort();
        timeSort.compareFunction = sortDates;
    }

public function get times():ArrayCollection{        
    var ac:ArrayCollection = new ArrayCollection(a.toArray().concat(b.toArray()));

    ac.sort = timeSort;
    ac.refresh();

    return ac;
}   

It’s about the getter method. I display the data of the getter in a datagrid and whenever I change some values of a or b I want to update the view as well. How do I achieve this? Currently the view doesn’t update itself automatically, I have to open up the view again to see the new values.

  • 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-16T05:39:25+00:00Added an answer on May 16, 2026 at 5:39 am

    When you make a property [Bindable], the Flex will read the getter whenever its setter is called (ie, when the property is updated); you haven’t declared any setter and hence there is no way for Flex to know that the value of property has been updated.

    You must define both a setter and a getter method to use the [Bindable] tag with the property. If you define just a setter method, you create a write-only property that you cannot use as the source of a data-binding expression. If you define just a getter method, you create a read-only property that you can use as the source of a data-binding expression without inserting the [Bindable] metadata tag. This is similar to the way that you can use a variable, defined by using the const keyword, as the source for a data binding expression.

    May be you can define an empty setter and call it whenever you update a or b.

    public function set times(ac:ArrayCollection):void { }
    
    //somewhere else in the code:
    
    a = someArrayCol;
    /** 
     * this will invoke the setter which will in turn 
     * invoke the bindable getter and update the values 
     * */
    times = null;
    

    Just noticed that you’re using Bindable on the class instead of the property: when you use the Bindable tag this way, it makes

    usable as the source of a binding expression all public properties that you defined as variables, and all public properties that are defined by using both a setter and a getter method.

    Thus, unless you define a setter, the property is not bindable even if the whole class is declared as bindable.

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

Sidebar

Related Questions

If I have a function that returns an object, but this return value is
I have two iterators, a list and an itertools.count object (i.e. an infinite value
I have a value like this: Foo Bar Another Value something else What regex
I have a Double which could have a value from around 0.000001 to 1,000,000,000.000
I'm sure we all have received the wonderfully vague Object reference not set to
I'm learning about DDD, and have come across the statement that value-objects should be
Say I have the value: -5 that represents a TimeZone (GMT-5). How can I
For example I have a value of 103.33 I want to put 100 to
I have a form action that needs to have its value set from a
First, why I ask: Now that reputation points on StackOverflow have real value (you

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.