Announcement Announcement Module
No announcement yet.
RichFaces tab + commit + detached object Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • RichFaces tab + commit + detached object

    Hello all,

    We are using SWF 2.0.8, RichFaces 3.3.2, Hibernate implementation (version 3.3.0) of JPA.

    We have a flow (called A) and a sub-flow (called B). In B, we have a view-state to display a screen with RichFaces tabs. We haven't found a way to switch flow state when a tab is selected, here is a thread about changing state situation:

    What we want is to commit the activity at each tab but to remain in B. We don't want users to work on the tabs which have seperate submit buttons then go back to the main screen to press Save button after everything is done. If we go to the end state in B to commit the transaction, we will return to A. Therefore we create a sub-flow of B for each tab, just to commit the transactions in that tab. It works fine with saving transactions, but when we used that approach for removing transactions, we got an error message "Removing a detached instance".

    We have <persistence-context/> in both A, B and each sub-flow of B

    Could anyone help us with what we should do?



  • #2
    Never mind, we found that we should commit the transactions in the service layer instead of creating a sub flow just to commit the transaction.

    Thanks everyone,