This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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.
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...