• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Creating Update Page

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

 

Summary
Review Date
Reviewed Item
Creating Update Page
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Creating Update Page"

    Leave a Message

    Your email address will not be published. Required fields are marked *

    Site Disclaimer, Copyright © 2016 - All Rights Reserved.

    Support


    Please leave a message and we'll get back to you soon.

    I agree to be contacted via e-mail.