Creating Update Page

Ratings:
(4)
Views:323
Banner-Img
  • Share this blog:

In this lesson we are going to see how to create Update page.  The update must contain the same details what we are entering while creating  or adding patient, so there fore the same page structure is required for us. Create one page attach AM to the Page. After creating the page go to the page structure of the Patient Entry page copy Region2 which is nothing but Message Component Layout Region and simply paste it in the main region of search page. 47 After Copying the page structure we can see that same page structure is copied into the new update page structure so that we can save some time rather than creating each item and changing the view instance and view attribute and prompt names etc., If we observe we not yet created Update Button and after updating Patient details we need to go back to the other main page, so for that another button need to be created.   Create two submit buttons with some space between the buttons looks good rather than placing them in conjunction. So create one spacer item between region and one more spacer item between two submit buttons. Finally the Update page structure looks like the following image: 48 Run the page to see the output and for the new created page also we need to attach corporate branding image. The update page contains the details which are already entered so we just need to edit only few values or we need to change only one or two changes like name is spelled wrong, amount entered is not correct or might be refunded to the patient, etc., So therefore whenever on search page if we click on Update Image then it must take us to this update page along with the details and after making changes we need to update the same row. First let us write the code to validate the Update button and other button in the page. Create the Controller in Update Page region, initialize the AM in the process Request of the controller: StirlingAMImpl am = (StirlingAMImpl)pageContext.getApplicationModule(webBean);am.xxinsertpatient(); Write the following code in processFormRequest, if you observe the code is similar code for update too like the way we wrote for patient entry. StirlingAMImpl am= (StirlingAMImpl)pageContext.getApplicationModule(webBean);if (pageContext.getParameter("update")!=null){  am.getOADBTransaction().commit();  throw new OAException("Patient Data Updated Successfully",OAException.CONFIRMATION);}if(pageContext.getParameter("item4")!=null){  pageContext.setForwardURL("OA.jsp?page=/xxstirling/oracle/apps/po/stirlingprj/webui/StrilingPG",                             null,                             OAWebBeanConstants.KEEP_MENU_CONTEXT,                             null,                             null,                             true,                             OAWebBeanConstants.ADD_BREAD_CRUMB_YES,                             OAWebBeanConstants.IGNORE_MESSAGES);} The below image shows the output of Update page. 50 Check out our Popular Trainings  Structure of OAF Advantages and Dis-Advantages of OAF SQL Server DBA Training in Hyderabad Creating First OAF Page in Project

You liked the article?

Like : 0

Vote for difficulty

Current difficulty (Avg): Medium

Recommended Courses

1/15

About Author
Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.


Stay Updated


Get stories of change makers and innovators from the startup ecosystem in your inbox