Problem with beforeRenderResponse behaviour

I will try to expose my problem as precisely as possible.

I have two toggle tabs “search” and “form”. These tabs, in project A, include respectively the search portlet from project B and the form portlet from project C. When a user accesses the form page, I put a lock on the data he is accessing so that no one else can modify this data. When the user who is editing the data goes back to the search page, I remove the locks. Technically, I have an action removeLocks that is called in the beforeRenderResponse() method of the search page, and an action addLock that’s called in the beforeRenderResponse() method of the form page.

What I have observed is this :

  1. when the user logs in and arrives on the search, I see the removeLocks action is called. That’s normal
  2. when he submits a search and the search page is refreshed, the removeLocks action is called. That’s normal too.
  3. when he clicks on a result link to access the form page, the removeLocks action is called. I’m not sure this is normal.
  4. when he submits data on the form page, the removeLocks action is called. This is not normal.

Can somebody explain me why the removeLocks action is called in steps 3 and 4 ? Is it because of the tabs that hide the search page and display the form page ? Is there anyway to avoid this behaviour, especially in step 4 ?

Thank you !

Hi
How are you including portlets from different projects (ProjectB and ProjectC) in project A?

I assume, when you are clicking the result link, whole page is refreshed; which results in calling the removeLocks action
Similary when you submit data on form page, whole Page (I mean the 'form" which contains toggle tabs) is refreshed again.

Can you try having async command link/button and refresh only the part of the page that is required (using toggle property) and not entire form

HTH
Mervin

*small correction
Can you try having async command link/button and refresh only the part of the page that is required (using Refresh property of the async command) and not entire form