« Return to Thread: Remove element from collection

Remove element from collection

by Anton Pirker :: Rate this Message:

Reply to Author | View in Thread

Hi List!

I have a collection events in the HopObject User. Now i want to remove
one event from the users list of events by doing: (but it should stay in
the database and other collections of the application)

        session.user.events.remove(eventObj);


this happens in the action. after this i render a skin where a macro is
called where i check for existence of the removed event

        if(session.user.events.get(eventId)) { do something }

the problem: the collection is not updated (the event is not removed) to
the if-statement is always true. only when i restart helma the event is
gone.

how can i remove an element from a collection so that it is removed
immediately so that i can check for its (non)existence in the same
request and get the right result.


cheers,
Anton


--
DI(FH) Anton Pirker, Helma Freelancer
_______________________________________________
Helma-user mailing list
Helma-user@...
http://helma.org/mailman/listinfo/helma-user

 « Return to Thread: Remove element from collection

LightInTheBox - Buy quality products at wholesale price