0
votes

I am developing a web app using Oracle ADF. I have a bounded task flow. In that I have a search page like below.

enter image description here

I have created the above two forms using view object data controls.

Searching is performing well. But my problem is when I go some where else in my application using menus provided left side and come back to the search page , the page is not getting refreshed. I am getting a search page that contains old search results. At this point of time if I am trying to make any changes am getting some error called "Another user with this id already modifed data ....". After this error my app is not running. Means what ever am trying to do its showing the same error.

So I need to make this: "When ever the user come to this form, He should get fresh form. It should not contain old search results.

Please help me. How do I achieve this.

Thank you.

2
Always mention your JDeveloper version so everybody knows which ADF version you are using. - User404
thank you. Am using jdeveloper 11.1.2.4 - Abdul

2 Answers

0
votes

There are 2 ways of doing it:

1) Set your task flow as ISOLATED, from Task Flow Overview tab -> Behaviour -> Share Data Control with calling task flow -> unchecked (or isolated, if you are using JDev 12c)

This will ensure you always start FRESH when accessing the page, but it will potentially create a performance overhead because entire View Object cache will be recreated (requeried) on page load. Nevertheless, it is the quickest solution.

2) You may create a default Method Call Activity in your task flow from where you may call a AM's custom method that resets the view criteria. The method will be placed on application module's implementation class and it may look like this:

public void initTaskFlow() {
   this.getViewObject1().executeEmptyRowSet();
}

This will clean the result data. If you want to reset the querying parameters as well, you can use this example:

http://www.jobinesh.com/2011/04/programmatically-resetting-and-search.html

0
votes

When you made any changes to any viewObject then excute this viewObject to match entity state and viewState , i think excuting viewObject will solve your issue

Ashish