Advertisement

09.05.2008 at 08:28AM PDT, ID: 23706593
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.4

Using oModel.ArrayCollection.refresh() in Cairngorm Command

Asked by Hwy419 in Adobe Flex, ActionScript

Tags: , ,

Please excuse my lack of familiarity with Flex, but I have an interesting problem maybe one of you can help me with. I am using Flex 2 with Cairngorm 2. In my view, I have a datagrid and multiple filtering controls. The filtering works great. A code-behind handles the filtering control change events.

When a user chooses a record in the datagrid, the details of that record are displayed and the user is able to edit and save the changes:

When the save button is clicked, the database service (updateWidget) is invoked and the changes are saved in the database. Upon the successful result from the server, another service call (getWidgets) is dispatched and the service returns the list of Widgets, which are then re-assigned to oModel.WidgetVOList : ArrayCollection from the onResult() method in the getWidgetsCommand.

The problem is that I want to also "re-apply" the filter upon the latest oModel.WidgetVOList update. I have tried a host of fixes, and the only one that would actually make any sense to me is to call oModel.WidgetVOList.refresh() from the onResult() method in the getWidgetsCommand.

==================
Please see code snippet
==================

When the onResult method of the getWidgetsCommand executes, the execution of the code seems to be reversed, as if the refresh() (filtering) occurs before the oModel.WidgetVOList = event as ArrayCollection.

I am assuming I am missing a simple piece of the puzzle, or doing something fundamentally wrong. Please inquire if you need any more information. Any suggestions are appreciated!
Start Free Trial
1:
2:
3:
4:
5:
/* GetWidgetsCommand */
public function onResult( event : * = null ) : void{
			oModel.WidgetVOList = event as ArrayCollection;
			oModel.WidgetVOList.refresh()
		}
[+][-]09.09.2008 at 11:53AM PDT, ID: 22430794

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Adobe Flex, ActionScript
Tags: Adobe, Flex, 2
Sign Up Now!
Solution Provided By: Hwy419
Participating Experts: 0
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628