{"id":13361,"date":"2014-12-13T03:35:10","date_gmt":"2014-12-13T03:35:10","guid":{"rendered":"http:\/\/www.erpschools.com\/?p=13361"},"modified":"2014-12-13T03:36:51","modified_gmt":"2014-12-13T03:36:51","slug":"integrating-search-delete-update","status":"publish","type":"post","link":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update","title":{"rendered":"Integrating Search, Delete, Update"},"content":{"rendered":"<p><b>Adding button and calling Create page from search<\/b><\/p>\n<p><b>Step1:<\/b> Right click on \u201cResultsTable\u201d under QueryRN which created in previous exercise of Search page and select New &gt; tableActions<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13373\" src=\"http:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115.png\" alt=\"image1\" width=\"568\" height=\"416\" srcset=\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115.png 568w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115-150x109.png 150w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115-300x219.png 300w\" sizes=\"auto, (max-width: 568px) 100vw, 568px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>It Automatically creates a flowLayout region and change region ID to <b>ButtonLayout<\/b><\/p>\n<p>Right click on ButtonLayout and select New &gt; Item and set properties as below<\/p>\n<p>ID=Create<\/p>\n<p>Item Style = submitButton<\/p>\n<p>Prompt=Create<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13372\" src=\"http:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image24.png\" alt=\"image2\" width=\"833\" height=\"477\" srcset=\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image24.png 833w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image24-150x85.png 150w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image24-300x171.png 300w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><b>Step2:<\/b> Create controller for ResultsTable region<\/p>\n<p>Right click on ResultsTable region in EmpSearchPG and select \u201cSet New Controller\u201d<\/p>\n<p>Specify package name = trng2.oracle.apps.ak.emp.webui<\/p>\n<p>Name=EmpResultsCO<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13371\" src=\"http:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image34.png\" alt=\"image3\" width=\"730\" height=\"280\" srcset=\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image34.png 730w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image34-150x57.png 150w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image34-300x115.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><b>Step3:<\/b> In the process form request method of EmpResultsCO writhe below statement to call EmpCreatePG<\/p>\n<p>public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)<\/p>\n<p>{\u00a0 \u00a0 super.processFormRequest(pageContext, webBean);<\/p>\n<p>if (pageContext.getParameter(&#8220;Create&#8221;) != null)<\/p>\n<p>{\u00a0 \u00a0 \u00a0 \/\/ Navigate to the &#8220;Create Employee&#8221; page while retaining the AM.<\/p>\n<p>pageContext.setForwardURL(&#8220;OA.jsp?page=\/trng2\/oracle\/apps\/ak\/emp\/webui\/EmpCreatePG&#8221;,<\/p>\n<p>null,<\/p>\n<p>OAWebBeanConstants.KEEP_MENU_CONTEXT,<\/p>\n<p>null,<\/p>\n<p>null,<\/p>\n<p>true, \/\/ Retain AM<\/p>\n<p>OAWebBeanConstants.ADD_BREAD_CRUMB_YES,<\/p>\n<p>OAWebBeanConstants.IGNORE_MESSAGES);<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p><b>Syntax:<\/b> setForwardURL<\/p>\n<p>void <b>setForwardURL<\/b>(<a href=\"http:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/java\/lang\/String.html\">String<\/a> url,<\/p>\n<p><a href=\"http:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/java\/lang\/String.html\">String<\/a> functionName,<\/p>\n<p>byte menuContextAction,<\/p>\n<p><a href=\"http:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/java\/lang\/String.html\">String<\/a> menuName,<\/p>\n<p>com.sun.java.util.collections.HashMap parameters,<\/p>\n<p>boolean retainAM,<\/p>\n<p><a href=\"http:\/\/java.sun.com\/j2se\/1.5.0\/docs\/api\/java\/lang\/String.html\">String<\/a> addBreadCrumb,<\/p>\n<p>byte messagingLevel)<\/p>\n<p><b>Parameters:\u00a0<\/b><\/p>\n<p>url &#8211; The URL to forward to. Example: OA.jsp?page=\/oracle\/apps\/po\/webui\/myPage<\/p>\n<p>functionName &#8211; The function to select with the current menu context<\/p>\n<p>menuContextAction &#8211; Determines the behavior of the MenuContext after forwarding to the new page. Some of the values are OAWebBeanConstants.KEEP_MENU_CONTEXT(keeps the menu context as is),\u00a0 OAWebBeanConstants.KEEP_NO_DISPLAY_MENU_CONTEXT (keeps the menu context as is, but will not display all menus including global buttons) etc<\/p>\n<p>menuName &#8211; The name of the HOMEPAGE menu to reset the Menu context. If the menuName is not of type HOMEPAGE a OAException will be thrown. You can pass null otherwise<\/p>\n<p>parameters &#8211; HashMap of parameter name\/value pairs to append to the forward url<\/p>\n<p>retainAM &#8211; If true, all the cached application modules will be retained. If false, all the cached application modules will be released<\/p>\n<p>addBreadCrumb &#8211; Controls breadcrumbs behavior. Some of the values are OAWebBeanConstants.ADD_BREAD_CRUMB_YES, OAWebBeanConstants.ADD_BREAD_CRUMB_NO etc.<\/p>\n<p>messagingLevel &#8211; Used to determine if the forward should be cancelled if messages or exceptions of level Error, Warning, Information or Confirmation are found. Possible values are OAWebBeanConstants.IGNORE_MESSAGES,\u00a0 OAException.ERROR etc<\/p>\n<p><b>Changing code in Apply button of EmpCreatePG so that it should direct back to EmpSearchPG on clicking button<\/b><\/p>\n<p><b>\u00a0<\/b><\/p>\n<p>In EmpCreateCO processformrequest method change code as below (highlighted lines are those which are newly added in this step)<\/p>\n<p>public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)<\/p>\n<p>{<\/p>\n<p>super.processFormRequest(pageContext, webBean);<\/p>\n<p>EmpAMImpl am = (EmpAMImpl)pageContext.getApplicationModule(webBean);<\/p>\n<p>if (pageContext.getParameter(&#8220;Apply&#8221;)!=null) {<\/p>\n<p>am.apply();<\/p>\n<p>OAException cmsg = new OAException(&#8220;Employee created&#8221;,OAException.CONFIRMATION);<\/p>\n<p>pageContext.putDialogMessage(cmsg);<\/p>\n<p>pageContext.forwardImmediately(&#8220;OA.jsp?page=\/trng2\/oracle\/apps\/ak\/emp\/webui\/EmpSearchPG&#8221;,<\/p>\n<p>null,<\/p>\n<p>OAWebBeanConstants.KEEP_MENU_CONTEXT,<\/p>\n<p>null,<\/p>\n<p>null,<\/p>\n<p>true,<\/p>\n<p>OAWebBeanConstants.ADD_BREAD_CRUMB_YES);<\/p>\n<p>}<\/p>\n<p>if (pageContext.getParameter(&#8220;Cancel&#8221;)!=null) {<\/p>\n<p>am.cancel();<\/p>\n<p>OAException cmsg = new OAException(&#8220;Employee Not created&#8221;,OAException.CONFIRMATION);<\/p>\n<p>pageContext.putDialogMessage(cmsg);<\/p>\n<p>pageContext.forwardImmediately(&#8220;OA.jsp?page=\/trng2\/oracle\/apps\/ak\/emp\/webui\/EmpSearchPG&#8221;,<\/p>\n<p>null,<\/p>\n<p>OAWebBeanConstants.KEEP_MENU_CONTEXT,<\/p>\n<p>null,<\/p>\n<p>null,<\/p>\n<p>true,<\/p>\n<p>OAWebBeanConstants.ADD_BREAD_CRUMB_YES);<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p><b>Note:<\/b> Difference of forwardImmediately and setForwardURL: Set forward url forwards to the page only after event got completed where as forward immediately move immediately leaving remaining commands in that event.<\/p>\n<p><b>Implementing Delete and Update buttons in search page (Switcher)<\/b><\/p>\n<p>Note: Please check that you have remove method in your EO to implement delete functionality through EO<\/p>\n<p><b>Scenario: <\/b>For simplicity, assume that if there is end date value exist in FWK_TBX_EMPLOYEES table means employee inactive irrespective of date value in it<\/p>\n<p>Creating Delete and Update switchers<\/p>\n<p><b>Step1:<\/b> Creating both switchers for delete and update. In order to do that need to modify query in EmpSummaryVO<\/p>\n<p>Open EmpSummaryVO by right clicking it and selecting Edit EmpSummaryVO. Select Sql Statement and change the query as below<\/p>\n<p>SELECT EmployeeEO.EMPLOYEE_ID,<\/p>\n<p>EmployeeEO.FULL_NAME AS EMPLOYEE_NAME,\u00a0 \u00a0 \u00a0 \u00a0 EmployeeEO.EMAIL_ADDRESS AS EMPLOYEE_EMAIL, \u00a0 EmployeeEO1.EMPLOYEE_ID AS MANAGER_ID,\u00a0 \u00a0 \u00a0 \u00a0 EmployeeEO1.FULL_NAME AS MANAGER_NAME,\u00a0 \u00a0 \u00a0 \u00a0 EmployeeEO1.EMAIL_ADDRESS AS MANAGER_EMAIL, \u00a0 flkp.meaning AS POSITION_DISPLAY,<\/p>\n<p><b>DECODE(nvl(to_char(EmployeeEO.END_DATE), &#8216;N&#8217;),\u00a0<\/b><\/p>\n<p><b>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &#8216;N&#8217;, &#8216;DeleteEnabled&#8217;, &#8216;DeleteDisabled&#8217;) AS DELETE_SWITCHER,<\/b><\/p>\n<p><b>DECODE(nvl(to_char(EmployeeEO.END_DATE), &#8216;N&#8217;),\u00a0<\/b><\/p>\n<p><b>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &#8216;N&#8217;, &#8216;DeleteEnabled&#8217;, &#8216;DeleteDisabled&#8217;) AS UPDATE_SWITCHER\u00a0 \u00a0<\/b><\/p>\n<p>FROM FWK_TBX_EMPLOYEES EmployeeEO,<\/p>\n<p>FWK_TBX_EMPLOYEES EmployeeEO1,<\/p>\n<p>FWK_TBX_LOOKUP_CODES_VL flkp<\/p>\n<p>WHERE EmployeeEO.MANAGER_ID = EmployeeEO1.EMPLOYEE_ID (+)<\/p>\n<p>and EmployeeEO.POSITION_CODE = flkp.lookup_code<\/p>\n<p>and flkp.lookup_type = &#8216;FWK_TBX_POSITIONS&#8217;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-13370\" src=\"http:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image44-1024x533.png\" alt=\"image4\" width=\"1024\" height=\"533\" srcset=\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image44-1024x533.png 1024w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image44-150x78.png 150w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image44-300x156.png 300w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image44.png 1037w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><b>Step2:<\/b> Right click on ResultsTable in the structure panel and select New \uf0e0 Switcher and set properties as below<\/p>\n<p>ID=DeleteSwitcher<\/p>\n<p>Region Style = switcher<\/p>\n<p>View Instance=EmpSummaryVO1<\/p>\n<p>View Attribute=DeleteSwitcher<\/p>\n<p>Prompt=Delete<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-13375\" src=\"http:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image54-1024x575.png\" alt=\"image5\" width=\"1024\" height=\"575\" srcset=\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image54-1024x575.png 1024w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image54-150x84.png 150w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image54-300x168.png 300w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image54.png 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><b>Step3:<\/b> Switcher region will be having one default case. Case is used to define various options of that attribute value. You need to create that many cases that data base column returns. Here DELETE_SWITCHER in query returns either DeleteDisabled or DeleteEnabled. So you need to create two cases<\/p>\n<p>Right click on &lt;case&gt; under DeleteSwitcher and select New \uf0e0 Item and set properties as below<\/p>\n<p>ID=DeleteDisabled (Note: this value should match to one of the value that return by column DELETE_SWITCHER you defined with decode in VO Sql query)<\/p>\n<p>Item Style = Image<\/p>\n<p>Image URI = deleteicon_disabled.gif<\/p>\n<p><b>Step4:<\/b> Right click on DeleteSwitcher and select New\uf0e0Case to create 2<sup>nd<\/sup> for enabled<\/p>\n<p>Right click on &lt;case&gt; under DeleteSwitcher and select New \uf0e0 Item and set properties as below for second case<\/p>\n<p>ID=DeleteEnabled (Note: this value should match to one of the value that return by column DELETE_SWITCHER you defined with decode in VO Sql query)<\/p>\n<p>Item Style = Image<\/p>\n<p>Image URI = deleteicon_enabled.gif<\/p>\n<p>Action Type=fireAction<\/p>\n<p>Event=delete<\/p>\n<p>Parameters: Click on Parameters which opens below dialog box<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-13374\" src=\"http:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image63-1024x575.png\" alt=\"image6\" width=\"1024\" height=\"575\" srcset=\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image63-1024x575.png 1024w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image63-150x84.png 150w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image63-300x168.png 300w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image63.png 1366w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Click on \u201cAdd Parameters\u201d and set Name DelEmpId and value ${oa.EmpSummaryVO1.EmployeeId}<\/p>\n<p>(Note: above syntax is called SPELL)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13369\" src=\"http:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image73.png\" alt=\"image7\" width=\"338\" height=\"302\" srcset=\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image73.png 338w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image73-150x134.png 150w, https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image73-300x268.png 300w\" sizes=\"auto, (max-width: 338px) 100vw, 338px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><b>Step5:<\/b> Right click on ResultsTable in the structure panel and select New \uf0e0 Switcher and set properties as below<\/p>\n<p>ID=UpdateSwitcher<\/p>\n<p>Region Style = switcher<\/p>\n<p>View Instance=EmpSummaryVO1<\/p>\n<p>View Attribute=UpdateSwitcher<\/p>\n<p>Prompt=Update<\/p>\n<p><b>Step6:<\/b> Switcher region will be having one default case. Case is used to define various options of that attribute value. You need to create that many cases that data base column returns. Here UPDATE_SWITCHER in query returns either UpdateDisabled or UpdateEnabled. So you need to create two cases<\/p>\n<p>Right click on &lt;case&gt; under UpdateSwitcher and select New \uf0e0 Item and set properties as below<\/p>\n<p>ID=UpdateDisabled (Note: this value should match to one of the value that return by column UPDATE_SWITCHER you defined with decode in VO Sql query)<\/p>\n<p>Item Style = Image<\/p>\n<p>Image URI = updateicon_disabled.gif<\/p>\n<p><b>Step7:<\/b> Right click on UpdateSwitcher and select New\uf0e0Case to create 2<sup>nd<\/sup> for enabled<\/p>\n<p>Right click on &lt;case&gt; under UpdateSwitcher and select New \uf0e0 Item and set properties as below for second case<\/p>\n<p>ID=UpdateEnabled (Note: this value should match to one of the value that return by column UPDATE_SWITCHER you defined with decode in VO Sql query)<\/p>\n<p>Item Style = Image<\/p>\n<p>Image URI = updateicon_enabled.gif<\/p>\n<p>Action Type=fireAction<\/p>\n<p>Event=update<\/p>\n<p>Parameter:<\/p>\n<p>Create parameter with name \u201cUpdateEmpId\u201d and value ${oa.EmpSummaryVO1.EmployeeId}<\/p>\n<p><b>Step8:<\/b> In EmpResultsCO add below code in processformrequest<\/p>\n<p>if (&#8220;delete&#8221;.equals(pageContext.getParameter(EVENT_PARAM))) {<\/p>\n<p>String DelEmpId = pageContext.getParameter(&#8220;DelEmpId&#8221;);<\/p>\n<p>Serializable[] params = { DelEmpId };<\/p>\n<p>OAApplicationModule am = pageContext.getApplicationModule(webBean);<\/p>\n<p>am.invokeMethod(&#8220;deleteEmp&#8221;,params);<\/p>\n<p>OAException msg = new OAException(&#8220;Employee Deleted&#8221;,OAException.CONFIRMATION);<\/p>\n<p>pageContext.putDialogMessage(msg);<\/p>\n<p>pageContext.forwardImmediatelyToCurrentPage(null,true,OAWebBeanConstants.ADD_BREAD_CRUMB_NO);<\/p>\n<p>}<\/p>\n<p><b>Step9:<\/b> In EmpAMImpl write below method<\/p>\n<p>public void deleteEmp(String DelEmpId) {<\/p>\n<p>if ( (DelEmpId!=null) || (&#8220;&#8221;.equals(DelEmpId)))<\/p>\n<p>{<\/p>\n<p>EmpVOImpl vo;<\/p>\n<p>vo = getEmpVO1();<\/p>\n<p>vo.setWhereClause(null);<\/p>\n<p>vo.setWhereClause(&#8220;EMPLOYEE_ID='&#8221;+DelEmpId+&#8221;&#8216;&#8221;);<\/p>\n<p>vo.executeQuery();<\/p>\n<p>vo.first().remove();<\/p>\n<p>apply();\u00a0 \/\/note this apply method we have written in earlier session. Otherwise use getTransaction().commit();<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p><b>Code to Update switcher<\/b><\/p>\n<p><b>Step1<\/b>: In EmpResultsCO.java write below code in process form request.\u00a0 \u201cupdate\u201d is the event created for UpdateSwitcher \uf0e0 UpdateEnabled case created in previous session. UpdateEmpId is the parameter created for same case item and this parameter we are passing to EmpCreatePG.<\/p>\n<p>if (pageContext.getParameter(EVENT_PARAM).equals(&#8220;update&#8221;)){<\/p>\n<p>String updEmpId = pageContext.getParameter(&#8220;UpdateEmpId&#8221;);<\/p>\n<p>HashMap hm = new HashMap();<\/p>\n<p>hm.put(&#8220;UpdateEmpId&#8221;,updEmpId);<\/p>\n<p>pageContext.setForwardURL<\/p>\n<p>(&#8220;OA.jsp?page=\/trng2\/oracle\/apps\/ak\/emp\/webui\/EmpCreatePG&#8221;,<\/p>\n<p>null,<\/p>\n<p>OAWebBeanConstants.KEEP_MENU_CONTEXT,<\/p>\n<p>null,<\/p>\n<p>hm, \/\/null, params<\/p>\n<p>true, \/\/retain am<\/p>\n<p>OAWebBeanConstants.ADD_BREAD_CRUMB_YES,<\/p>\n<p>OAWebBeanConstants.IGNORE_MESSAGES<\/p>\n<p>);<\/p>\n<p>}<\/p>\n<p><b>Step2:<\/b> In EmpCreateCO.java change logic as below in processRequest method. Because we need to identify whether this page is called when selected \u201cCreate\u201d or \u201cUpdate\u201d in EmpSearchPG and accordingly it should initiate the row<\/p>\n<p>public void processRequest(OAPageContext pageContext, OAWebBean webBean)<\/p>\n<p>{<\/p>\n<p>super.processRequest(pageContext, webBean);<\/p>\n<p>OAMessageRadioButtonBean uMr = (OAMessageRadioButtonBean) webBean.findChildRecursive(&#8220;TitleMr&#8221;);<\/p>\n<p>uMr.setName(&#8220;Title&#8221;);<\/p>\n<p>uMr.setValue(&#8220;Mr&#8221;);<\/p>\n<p>OAMessageRadioButtonBean uMiss = (OAMessageRadioButtonBean) webBean.findChildRecursive(&#8220;TitleMiss&#8221;);<\/p>\n<p>uMiss.setName(&#8220;Title&#8221;);<\/p>\n<p>uMiss.setValue(&#8220;Miss&#8221;);<\/p>\n<p>OAMessageRadioButtonBean uMrs = (OAMessageRadioButtonBean) webBean.findChildRecursive(&#8220;TitleMrs&#8221;);<\/p>\n<p>uMrs.setName(&#8220;Title&#8221;);<\/p>\n<p>uMrs.setValue(&#8220;Mrs&#8221;);<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>EmpAMImpl am = (EmpAMImpl)pageContext.getApplicationModule(webBean);<\/p>\n<p>if (!((pageContext.getParameter(&#8220;UpdateEmpId&#8221;)==null) || (pageContext.getParameter(&#8220;UpdateEmpId&#8221;).equals(&#8220;&#8221;)))) {<\/p>\n<p>String pEmpId = pageContext.getParameter(&#8220;UpdateEmpId&#8221;);<\/p>\n<p>am.updateEmp(pEmpId);<\/p>\n<p>}<\/p>\n<p>else<\/p>\n<p>{<\/p>\n<p>am.createEmployee();<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p><b>Step3:<\/b> In EmpAMImpl.java write below procedure which is calling from above step<\/p>\n<p>public void updateEmp(String empnum) {<\/p>\n<p>EmpVOImpl vo = getEmpVO1();<\/p>\n<p>vo.setWhereClause(null);<\/p>\n<p>vo.setWhereClause(&#8220;EMPLOYEE_ID = &#8220;+empnum);<\/p>\n<p>vo.executeQuery();<\/p>\n<p>vo.first();<\/p>\n<p>}<\/p>\n<p><b>Step4:<\/b> Also as we are using setwhercclause for VO in delete and update methods, we need to remove it at the time new record creation. Hence please make below change in createEmployee method in EmpAMImpl.java<\/p>\n<p>public void createEmployee() {<\/p>\n<p>EmpVOImpl empVo = getEmpVO1();<\/p>\n<p>\/\/\u00a0 \u00a0 \u00a0 \u00a0 if (!empVo.isPreparedForExecution())<\/p>\n<p>empVo.setWhereClause(null);<\/p>\n<p>empVo.executeQuery();<\/p>\n<p>Row row = empVo.createRow();<\/p>\n<p>empVo.insertRow(row);<\/p>\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding button and calling Create page from search Step1: Right click on \u201cResultsTable\u201d under QueryRN which created in previous exercise of Search page and select New &gt; tableActions &nbsp; It Automatically creates a flowLayout region and change region ID to ButtonLayout Right click on ButtonLayout and select New &gt; Item and set properties as below [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[111],"tags":[],"class_list":["post-13361","post","type-post","status-publish","format-standard","hentry","category-oracle-application-framework-articles"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Integrating Search, Delete, Update - erpSchools<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Narasimha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#article\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update\"},\"author\":{\"name\":\"Narasimha\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/46075962b877fb633e20447c79725736\"},\"headline\":\"Integrating Search, Delete, Update\",\"datePublished\":\"2014-12-13T03:35:10+00:00\",\"dateModified\":\"2014-12-13T03:36:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update\"},\"wordCount\":1612,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"image\":{\"@id\":\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#primaryimage\"},\"thumbnailUrl\":\"http:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115.png\",\"articleSection\":[\"OAF\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update\",\"url\":\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update\",\"name\":\"Integrating Search, Delete, Update - erpSchools\",\"isPartOf\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#primaryimage\"},\"image\":{\"@id\":\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#primaryimage\"},\"thumbnailUrl\":\"http:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115.png\",\"datePublished\":\"2014-12-13T03:35:10+00:00\",\"dateModified\":\"2014-12-13T03:36:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#primaryimage\",\"url\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115.png\",\"contentUrl\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115.png\",\"width\":568,\"height\":416},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/erpschools.com\/erps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integrating Search, Delete, Update\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/erpschools.com\/erps\/#website\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"name\":\"erpSchools\",\"description\":\"Oracle Apps\",\"publisher\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/erpschools.com\/erps\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/erpschools.com\/erps\/#organization\",\"name\":\"erpSchools\",\"url\":\"https:\/\/erpschools.com\/erps\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"contentUrl\":\"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png\",\"width\":250,\"height\":60,\"caption\":\"erpSchools\"},\"image\":{\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"http:\/\/facebook.com\/erpschools\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/46075962b877fb633e20447c79725736\",\"name\":\"Narasimha\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6a59a4c3c2b563e3560b2e9c020c8178d6315e50ed3fed9d668de1170c726c4b?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6a59a4c3c2b563e3560b2e9c020c8178d6315e50ed3fed9d668de1170c726c4b?s=96&d=blank&r=g\",\"caption\":\"Narasimha\"},\"url\":\"https:\/\/erpschools.com\/erps\/author\/narasimha\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Integrating Search, Delete, Update - erpSchools","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update","twitter_misc":{"Written by":"Narasimha","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#article","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update"},"author":{"name":"Narasimha","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/46075962b877fb633e20447c79725736"},"headline":"Integrating Search, Delete, Update","datePublished":"2014-12-13T03:35:10+00:00","dateModified":"2014-12-13T03:36:51+00:00","mainEntityOfPage":{"@id":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update"},"wordCount":1612,"commentCount":0,"publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"image":{"@id":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#primaryimage"},"thumbnailUrl":"http:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115.png","articleSection":["OAF"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#respond"]}]},{"@type":"WebPage","@id":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update","url":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update","name":"Integrating Search, Delete, Update - erpSchools","isPartOf":{"@id":"https:\/\/erpschools.com\/erps\/#website"},"primaryImageOfPage":{"@id":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#primaryimage"},"image":{"@id":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#primaryimage"},"thumbnailUrl":"http:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115.png","datePublished":"2014-12-13T03:35:10+00:00","dateModified":"2014-12-13T03:36:51+00:00","breadcrumb":{"@id":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#primaryimage","url":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115.png","contentUrl":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/image115.png","width":568,"height":416},{"@type":"BreadcrumbList","@id":"https:\/\/erpschools.com\/erps\/oracle-application-framework-articles\/integrating-search-delete-update#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/erpschools.com\/erps"},{"@type":"ListItem","position":2,"name":"Integrating Search, Delete, Update"}]},{"@type":"WebSite","@id":"https:\/\/erpschools.com\/erps\/#website","url":"https:\/\/erpschools.com\/erps\/","name":"erpSchools","description":"Oracle Apps","publisher":{"@id":"https:\/\/erpschools.com\/erps\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/erpschools.com\/erps\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/erpschools.com\/erps\/#organization","name":"erpSchools","url":"https:\/\/erpschools.com\/erps\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/","url":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","contentUrl":"https:\/\/erpschools.com\/erps\/wp-content\/uploads\/img\/erps_logo7.png","width":250,"height":60,"caption":"erpSchools"},"image":{"@id":"https:\/\/erpschools.com\/erps\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/facebook.com\/erpschools"]},{"@type":"Person","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/46075962b877fb633e20447c79725736","name":"Narasimha","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/erpschools.com\/erps\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6a59a4c3c2b563e3560b2e9c020c8178d6315e50ed3fed9d668de1170c726c4b?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6a59a4c3c2b563e3560b2e9c020c8178d6315e50ed3fed9d668de1170c726c4b?s=96&d=blank&r=g","caption":"Narasimha"},"url":"https:\/\/erpschools.com\/erps\/author\/narasimha"}]}},"_links":{"self":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/13361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/comments?post=13361"}],"version-history":[{"count":0,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/posts\/13361\/revisions"}],"wp:attachment":[{"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/media?parent=13361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/categories?post=13361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/erpschools.com\/erps\/wp-json\/wp\/v2\/tags?post=13361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}