-
1. Re: Data getting saved on Edit page cancel.
lvdberg Sep 17, 2010 5:55 AM (in response to tausuahmed)Hi,
This can happen because of Ajax-submits which can be prevented by inclduing parts of the page in a a4j:region tag or using manual flushing and have the flush method called only in the save-action.
Leo
-
2. Re: Data getting saved on Edit page cancel.
tausuahmed Sep 17, 2010 6:24 AM (in response to tausuahmed)Thanks Leo,
Though I have manual flushing enabled in my edit.page.xml, the data is getting saved once we come out of the focus of that particular field which has partialSubmit as true.
Is there anything else to configure for manual flush.
Tauseef
-
3. Re: Data getting saved on Edit page cancel.
lvdberg Sep 17, 2010 6:29 AM (in response to tausuahmed)Hi,
ajax-enabled tags are great but the rich-ones have some
free
behaviour. If you don't encapsulate the particular tag inside a a4j:region AND limit the reRendering of other components. This can be done by setting the limitToList attribute. The other thing you can do is disable the bypassUpdates if you don't want ajax to trigger an update on the model when you leave the field, so it basically only used for validating and not for saving.Leo
-
4. Re: Data getting saved on Edit page cancel.
tausuahmed Sep 17, 2010 6:40 AM (in response to tausuahmed)Leo i am using only icefaces, can you tell me how to use bypassupdates.
-
5. Re: Data getting saved on Edit page cancel.
lvdberg Sep 17, 2010 6:54 AM (in response to tausuahmed)Hi,
I never used Iceface so I can't help you here. I can only recommend to fine-tune the manual flushing part, because saving shouldn't be triggered without an explicit call to flush.
Success
Leo
-
6. Re: Data getting saved on Edit page cancel.
tausuahmed Sep 17, 2010 8:22 AM (in response to tausuahmed)Anyway Thanks Leo.
-
7. Re: Data getting saved on Edit page cancel.
jguglielmin Sep 17, 2010 11:16 AM (in response to tausuahmed)It sounds like your manual flush is not setup properly. Did you generate facelet pages with seam-gen? You might want to generate a new page (from database) using seam-gen to see how the manual-flush for hibernate is setup. If you don't have the manual flush, then every partial submit will submit the form (and Seam is wired with autoflush directly to database).
-
8. Re: Data getting saved on Edit page cancel.
tausuahmed Sep 18, 2010 3:24 AM (in response to tausuahmed)Thanks judy,
I have generated my project using seam-gen and in all *.page.xml it has flush mode to manual.
Is there any other configuration i need to do??
Tauseef