I need help in a requirement that I'm currently working on.
I have an AM (BillOfMaterialsAM) and I have a VO (BillOfMaterialsVO) for the table BOM_BILL_OF_MATERIALS using the ff:
select a.assembly_item_id , a.organization_id , b.segment1 from bom_bill_of_materials a , mtl_system_items_b b where a.assembly_item_id = b.inventory_item_id and a.organization_id = b.organization_id
Then I have 2 pages.
Page 1 -> Select Inventory Organization
- In this page, I have a MessageChoice bean and a Submit button. Upon submit, I set a session variable in ProcessFormRequest using
- Page 2 -> Search Page
- In this page, I get the session variable in ProcessRequest using
- I have a button ChangeOrganization that basically redirects to Page 1.
- I also have a Query region and a table for my BillOfMaterialsVO.
- In my ProcessRequest, I've also added the following:
BillOfMaterialsAM am = (BillOfMaterialsAM)pageContext.getApplicationModule(webBean); BillOfMaterialsVO vo = am.getBillOfMaterialsVO1(); vo.setWhereClause(null); vo.setWhereClauseParams(null); vo.setWhereClause("organization_id = :0"); vo.setWhereClauseParam(0, Integer.parseInt(pageContext.getSessionValue("mfg_organization_id"))); OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("QueryRN"); queryBean.clearSearchPersistenceCache(pageContext);
Now the problem I'm having is that when Page 2 shows up the first time, it is working as expected. Shows the table and a message "No search conducted".
Then I do a search and it shows the data in the table. I click ChangeOrganization and go back to Page 1. I select a different Organization and click Submit. When I go back to Page 2, the result set that was displayed prior to me going to Page 1 is still shown.
How can I set this Page 2 to clear the table and show "No search conducted" everytime the page loads?
Appreciate your help.