I'm not sure I'm comprehending the whole case, but may be the user should
not be allowed to delete a message if there is no session ?

On Wed, Dec 26, 2012 at 3:26 PM, sommeralex <alexander.som...@gmail.com>wrote:

> Hello!
>
> My page is showing a message object, which should also be able being
> deleted
> by user (within that page)
>
>         Object onActionFromDelete(){
>                         messageService.deleteMessage(message);
>                         message = null;
>
> msgContainer.addMessage(DisplayMessage.AIRMESSAGE_DELETE_SUCCESS);
>                         return
> pageRenderLinkSource.createPageRenderLinkWithContext(EditMessages.class,
> groupId);
> }
>
> this does not work due to a error message coming up that the session was
> closed (or not initialised: lazy loading) - i believe that tapestry needs
> an
> existing object - i have tried it also with message = null; before
> messageService.deleteMessage(message) and instead i put just the ID in my
> deleteService. But this did also not work.
>
> I guess the right approach is to "close" the page, and after that i can
> delete the object the page is referring to. My first approach was putting a
> delete flag in PageDetached -  but pageDeatached is depreachiated.
>
> Or is there just a simpler solution?
>
>
>
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Deleting-persitent-Object-within-Page-tp5718987.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to