• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Flex and Java cannot add anything to list

Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been looking for hours why my ArrayCollection doesn't update after I add or delete an item.
I am trying to make a site to create read update and delete with flex, java and blazeds.
I can list the objects my model makes when it is created, changing anything after creation doesn't work.
If anybody has any ideas what I'm forgetting/ doing wrong I will be extremely thankfull.

Thank you!


The add function is called at line 22-23
The function itself is located at line 63-71 and the add function on the db is called on line 66.
My code:
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would make a few suggestions.

I would separate out the BlazeDS functionality from the player and visual elements. Make a BlazeDS object (I suggest you use ActionScript for that) and then it will be easier for you to see what you are sending to and receiving from the server.

I don't see in your ResultHandler (or anywhere else) where you are adding any new values to your ArrayCollection. Keep in mind that Flex is asynchronous. The way your code is designed, you could very well be looking for results to show up in the code that just are not there at the time you look for them - but get there later. Flex is not like Java (Java is synchronous). If I have two lines of code in Java, line B will not run until line A is done. If I try that in Flex, line B will run no matter what is going on with line A.

If you parse your functions into new objects, it will make it easier to put in Alert.show() messages to track your code from point to point and see where your problem is. You might put in an Alert.show('new_speler_var') where you are expecting that new var is being added to speler. That may be very revealing to you...
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic