Hello,
Two more methods:
1. To use method executeBindings(), on the control
2. To recreate the data to which control is binded. For example if we have a list that is binded to array, then we need to recreate the array:
temp_arr = new Array();
temp_arr = new_arr;
my_arr = new Array();
//------here we can make any changes to temp_arr-------
temp_arr[n] = x;
//----------------------------------------------------------------------
my_arr = temp_arr;
Best regards
Stanislav
On 10/7/05, Dimitrios Gianninas <[EMAIL PROTECTED]> wrote:
I think the only way to address your issue. Use the appropriate ViewHelper to tell the view to refresh itself because the data has been updated.Dimitrios "Jimmy" GianninasRIA DeveloperOptimal Payments Inc.
From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of thomasburleson
Sent: Thursday, October 06, 2005 8:27 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] When ModelLocator Databinding does not work...
I would like to ask the cairngorm experts a question involving--
databinding.
In a current application under development, when I need to load some
data via remoteObjects we use the .getInstance().broadcastEvent( )
which gets forwarded by our controller to the appropriate command.
The delegate dataservice call executes and the result handler is
either in a command onResult_<xxx> method or in a Delegate.create()
callback [passed with the broadcastEvent]. The result data is
massaged and assigned to a property in the ModelLocator.
Great no problem.
But what do we do when the has UI components that do not have direct
bindings to ModelLocator attributes. One trick is to use the
following databinding to fire a "build" method:
<mx:Tree id="companyTree" dataProvider="{buildFromSearchResults
(ModelLocator.companiesFoundBySearch)}" ...
This also works.
But my question is regarding views that are indirectly to
ModelLocator data. So when that data changes, I need to tell the
view to "somehow" update or reinit its contents.
Currently we use
var viewAddressEditor : Object = ViewLocator.getInstance
().getComponentByID( "addressEditorView" );
viewAddressEditor.updateContent();
But this seems SO clumsy and non-elegant. Does anyone have a better
suggestion?
Many thanks,
ThomasB
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.