Hi friends,
I´m having some hard time trying to figure out the solution for what should be something simple. Its best explained through an example:
I´m using CakePHP as the framework of the application server and cakeAMFPHP which allows me to use Cake´s controller classes as flash remoting services.
Now enters my use case: I have a method in the EventsController.php class (which is the flash remoting servcie and Cake´s controller class for the Event logic unit), the getEvents($offset,$limit) that should return an array of Events encapsulated in the EventVO class. I have a property in the EventVO class called DefaultImageID, this var should receive an ID of a picture, this picture is randomly chosen from the pictures of the albums that this Event owns. However, I´m using Cake´s findAll() model´s method which already returns an array with the resultset and it gives me no chance to "attach" or set additional properties to the array returned for the row ... (as I would do if I was doing it manually with foreach...).
The only solution I could think of is: First I load the events, then, in the client-side, I get the id of the event and call the getRandomImage($image_id) remote method... however, I think if all this could be done inside the getEvents and returned in the EventVO object, it would be better... what do you think?
Thanks,
Marcelo.
_______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
