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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:12:09+00:00 2026-05-28T14:12:09+00:00

I have a NavigatorContent which is displayed when the user selects an item in

  • 0

I have a NavigatorContent which is displayed when the user selects an item in a DataGrid.
This NavigatorContent contains a form and an accordion displaying the related objects.

When the user presses the Save button in the NavigatorContent the form and the children should be saved to the database by calling the server through BlazeDS:

saveObjectToDB()
{
  //Map the form values to the object
  object.field1 = object_field1.text;
  object.field2 = object_field2.selectedDate as Date;
  object.relatedobject3 = comboBox.selectedItem as RelatedObject3;
  //etc.....

  //Loop through accordion to save the child objects
  for(var i:int= 0; i < accordion.numChildren; i++ )
  {
    if(accordion.getChild(i) is RelatedObject1Form)
    {
      var formRelated1:RelatedObject1Form = accordion.getChild(i) as RelatedObject1Form;
      //Map the form values to the related object
      object.relatedobject1.field1 = formRelated1.relatedobject1_field1.selectedDate;
      //etc...
    }
    if(accordion.getChild(i) is RelatedObject2Grid)
    {
      var gridRelated2:RelatedObject2Grid = accordion.getChild(i) as RelatedObject2Grid;
      //Get dataProvider for the datagrid of the relatedObject
      object.relatedobject2 = gridRelated2.object.relatedobject2;
    }
  }

  // Call the remoting object's saveObject method
  var saveObjectOperation:Operation = new Operation();
  saveObjectOperation.name = "saveObject";
  saveObjectOperation.arguments=[object];
  ro.operations = [saveObjectOperation];
  saveObjectOperation.send();

  if(isNewObject)
    //dispatchEvent new object
  else
    //dispatchEvent object updated
}

My problem is as the question states that my application freezes for a few seconds when the user presses the save button that calls this method. I guess that is because Flex is single threaded, but still i dont quite get why this method would be so computational expensive? It doesnt seem to matter if i comment out the loop that loops over the accordion children.

I tried setting the objects related objects to null before calling the remote save method, and this seemed to speed up the save method, but it provided me with some troubles later.

My conclusion is that the remote call is whats freezing up the application, and if i set the related objects to null this seems to fix the issue. But is this really necessary? The related objects aren’t really that big, so i don’t quite get why the remote call should freeze the application for a few seconds.

This is how i create the accordion children when the NavaigatorContent is intialized:

    var relatedObjectForm:RelatedObject1Form= new RelatedObject1Form();
    accordion.addChild(relatedObjectForm);
    relatedObjectForm.object= object;
    relatedObjectForm.ro = this.ro;

The object that i pass to the accordion children is public and [Bindable] in the NavigatorContent and in the accordion children and is initially passed from the main DataGrid. May this be a problem relating to this issue?

Any help/comments is much appreciated. This issue is starting to affect my beauty sleep 😉

  • 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-28T14:12:10+00:00Added an answer on May 28, 2026 at 2:12 pm

    My guess would be that you’re spending a lot of time in the serializer. Put a trace target in the app and watch the console when it runs to see what’s being sent.

    The most likely problems are from DisplayObjects – if they’ve been added to the application they will have a reference to the application itself, and will cause some serializers to start serializing the entire app. The bindable object might have some odd events attached that eventually attach to DisplayObjects – try copying the relevant values in it into your object instead of just taking a reference to the existing object.

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

Sidebar

Related Questions

Have the following scenario. I have a few form, which essentially have a few
Have seen multiple posts on this but I can't see any which answer my
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have you managed to get Aptana Studio debugging to work? I tried following this,
I have a TabNavigator with NavigatorContent's in MXML. Inside the first NavigatorContent I have
Have converted devise new session from erb to Haml but doens't work, this is
have Googled the cr*p out of this one so apologies if the answer is
Have some dates in my local Oracle 11g database that are in this format:
Have anyone used Redmine Documentor which lets you convert PHP to HTML to Redmine
I have the following code for accordion in Flex 4 with couple of checkboxes

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.