[Helma-user] Remove element from collection

Walter Krivanek, VividVisions walter.krivanek at vividvisions.at
Thu Apr 10 12:02:12 CEST 2008


Hi Anton,

I think, res.commit() is what you're looking for.
http://helma.zumbrunn.net/reference/res.html#res.commit

Bye,
Walter

Anton Pirker (10.04.2008 11:52):
> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2445 bytes
Desc: not available
Url : http://helma.org/pipermail/helma-user/attachments/20080410/c5ae642e/attachment.bin 


More information about the Helma-user mailing list