[Helma-user] Remove element from collection

Anton Pirker helma at gmiatlich.net
Thu Apr 10 11:52:06 CEST 2008


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


More information about the Helma-user mailing list