This content has been marked as final.
Show 4 replies
-
1. Re: Add using home object
damianharvey.damianharvey.gmail.com Mar 5, 2008 1:56 PM (in response to lasansue.jeremy.girard.satives.fr)It depends if you are navigating away from the page or not. Either way have a look at clearInstance() in your persist() or update() method.
Cheers,
Damian.
-
2. Re: Add using home object
lasansue.jeremy.girard.satives.fr Mar 5, 2008 2:46 PM (in response to lasansue.jeremy.girard.satives.fr)Thanks for your answer.
I've done severial things : cleanInstance() in my persist homeobject method
String result = super.persist(); clearInstance(); return result;
Tried to remove the bean from context
if(pageContext != null)pageContext.remove("accountItem"); if(eventContext != null)eventContext.remove("accountItem"); if(serverConversationContext != null)serverConversationContext.remove("accountItem"); if(basicContext != null)basicContext.remove("accountItem");
But the field are still filled in with the submitted and persited accountItem
-
3. Re: Add using home object
damianharvey.damianharvey.gmail.com Mar 5, 2008 3:07 PM (in response to lasansue.jeremy.girard.satives.fr)Post your code so we can have a looky.
Also there is the Contexts.removeFromAllContexts() method that you can use instead of going through them all (does the same thing though).
Cheers,
Damian.
-
4. Re: Add using home object
lasansue.jeremy.girard.satives.fr Mar 5, 2008 3:19 PM (in response to lasansue.jeremy.girard.satives.fr)That's it.
I was on the right way when trying to remove something on context but i don't know where to remove.With Contexts.removeFromAllContexts(), it works.
Thanks a lot Damian.