-
1. Re: Field processing without submitting?
smithbstl Sep 25, 2007 10:45 AM (in response to stephen.friedrich)This is sort of heavy handed but can you call entityManager.clear() first to detach the entity? This will detach ALL entities from your pc. Unfortunately clear() is not overloaded to take a particular class or object :(
-
2. Re: Field processing without submitting?
jacob.orshalick Sep 25, 2007 10:53 AM (in response to stephen.friedrich)By default, the persistence context is going to be flushed after every transaction but if you are using an SMPC you can use specify flush mode as manual when beginning your conversation. This allows you to control when your entities are flushed to the DB. This is described in the documentation at:
http://docs.jboss.com/seam/2.0.0.CR1/reference/en/html/persistence.html#d0e5862 -
3. Re: Field processing without submitting?
stephen.friedrich Sep 26, 2007 4:50 PM (in response to stephen.friedrich)Thanks to you two.
I was pondering to fall back to hibernate specific api to be able to call evict() for a single entity instance.
Probably the suggestion Jacob made is cleaner. I just have to learn and understand where and how to start/end my conversation.
For now I have a third solution working: I marked my Test button as immediate="false" and for both the script field and the test value input field I used binding attribute to be able to get the submitted value directly from the component.
Then I do
FacesContext.getCurrentInstance().renderResponse();
to skip the remaining phases.