I can see that, but what is then proper way to handle this?
I need to persist object A in one panel to open new panel from first panel (beacuse bean in new panel have foregin key to bean in first panel) and so on. Now if user decide to insert beans in sub-panels and to not insert bean in first panel all persisting should be discarded without any insert in database and that is ok beacuse i am calling flush only on first panel. But problem is when user decite to not insert beans in sub-panels and to insert bean in first panel. As i flush session here, all previously persisted objects will be in database and i want to avoid this.
Any ideas?
|