10. Extending View Object (VO) : Creation or updating attributes Updating SQL Statement List of Seeded and New Custom Attributes Generating Java Classes
WE will talk about some examples where we would require extensions and get a better idea about what are extensions in OAF. Things you need to know for doing extensions is important as there are various components which are related to a particular page. So we will discuss what are the various things we need to know and how we get this particular information. During extensions the main components that are extended are the view objects, application module and the controller. So we will take a look as to how we extend these components and where we need to extend these components. We will talk in brief about personalization and how the personalization of a page is important or plays a role during extension. It may be so that you have done your development on one instance and now you would like to add these same extensions to another new instance. So we will talk about how we can deploy in a systematic way.
Installation is the process of moving E-Business Suite from the distribution media (i.e., CD or DVD) to the host system. Installation is only the first step of bringing up a fully functional E-Business Suite instance. The software still needs to be configured to the specific needs of the business or business unit for which it is installed. The software may also need to be installed on multiple servers if a multi-node installation is desired. Configuration is the process of setting the proper parameters and customer-specific information for a fully-functional E Business Suite instance. Personalization is the process of making changes to the User Interface (UI) from within an E-Business Suite form/page. It is possible to make personalizations to both Forms-based and OA Framework-based pages. Extensibility refers to the ability to programmatically extend an application's functionality. In other words, extending the n functionality of an application gives developer the ability of: · Adding new content or business logic · Extending/overriding existing business logic
This first screen shot is of a search page in iRecruitment module. The seeded functionality provided the user to search vacancies on various fields, but this seeded functionality did not allow a user to have a multiple search on a single field. As we can see in the picture, we have 4 different request type, in the seeded functionality we could select on only of these request type. There was a requirement where a user would like to have multiple selection on a particular field and perform the search. This requirement could not be satisfied without extension. To satisfy this requirement there was a need to add various shuttles and then perform the search. In the future slides we will understand how we need to go ahead to extending a particular page. The second example is from the sourcing application. In sourcing a surrogate bid is created by the user on behalf of the supplier. There was this requirement where this surrogate bid could be a responsive or a non-responsive bid. To satisfy this requirement we had to created a custom region, which would ask the user whether the bid is responsive or non responsive. If the bid is non-responsive then a compulsory textbox would appear which would ask the user to give a particular reason. This requirement could not be satisfied be using personalizations only. The was a need to extend, create various components to satisfy the need.
This example is again taken from the sourcing application. This is a table which would display all the bids with regard to an auction. In the seeded functionality the comments column of this table was not present. This column’s functionality has been added through extensions. The need was that if we click on the comments icon it would redirect the user to another page and show all the comments with regards to a particular bid. We can surely add this column and the image icon through personalizations, but we required to do extensions for displaying the respective comments. Extensions was done to handle the on click event of the icon. Extensions could also be done to override the seeded functionality. Here is an example where sections were required to be added while creation of an auction. Functional Evaluation is one such section. The seeded code would allow the user to add this functionality without any verifications. There was a requirement where the user had to explicitly specify whether he/she would like to add functional evaluation or not. For this requirement we added a new region to the page and handle this validation via extension. If a user would select yes for functional evaluation section then a text box would appear where the user needed to specify the minimum value. The rendering of this textbox and further validations that is if functional evaluation is yes then and only then the user is allowed to add this section, required extension.
Let us now talk about the various terminologies required to be known when we go ahead to extensions. The first thing is the page. Whatever is rendered or displayed in the browser is called the page. Now in OAF, self-serviced pages have various regions. These regions make up the page. Within every region there are many items, which may be a textbox or a label or any other item. In OAF all the BC4J components plays a vital role in displaying, storing and updating data from the front end. The first is the application module i.e is called the AM. The AM acts as a pool of all connection. The AM handles all the transactions and interacts with the clients. Next is the Entity Object ,which is mapped to the database table or other data source. The entity Object which is known an EO, is a fundamental BC4J component through which all the insert/update/delete interact with the database. A view Object represents a query result. A view Object can be based on any number of Entity Objects. In this webinar we will be going through extending these components. An OA controller can be associated with any region but a controller cannot be associated to any item. A controller may be created for various reasons like, Handle the press of a button Dynamic WHERE clause JSP forwads Rendering UI elements depending on some conditions Handling business logic Personalizations means declaratively changing the user interface, the look and feel, or may be the layout of the page depending on some business logic. To personalize a particular page we can select the “Personalize Page” link, which is shown on the top right of the page. Note that this link may or may not be visible to you, this is because the system admininstrator has not enabled personalizations to your user. On click of this link you will get the hierarchy of all the items in the page and here you can personalize the current page. The next important link is “about this page”. This link is seen at the left bottom of the page. With this link you can view all the items that are present on the page and also you can view all the components associated with the current page. we will talk about this in detail in the upcoming slides.
This is an example of extension where we added this new column named scaled weight to the seeded table. Firstly we would like to know is how we do this extension and what are the various things we need to know for this extension. Keeping in mind this example let us understand how we should go forward towards extension. Ebs contains various applications and each application has its short name. Now when we talk in terms of an applications in EBS each application has its own path on the server. About the application path and how we get to know what is the application path, we will talk about this in detail in the up coming slides. So when we start with extensions, it is necessary to know the path and also the page name you dealing with. As discussed earlier application module i.e. an AM acts as a pool of all connections and every page contains its own rootAM. So we should identify which is the AM with our current page. Oaf also holds a concept of AM’s where a particular Region may have its own AM. In the above example we see the results in this table through a VO. Now if we want to add this weight column to the table, we would require to extend this view object. As we know that a page contains various regions. It can be possible that the particular region you are planning to extend has its own controller. So if we require to extend a controller, we should understand which particular controller we need too. In order to extend the functionality of the page we need to retrieve the class files from the server to your local instance. Now the first question that will pop up is “from where do we pick up these class files.?” Here is where the application path comes into picture.
We spoke in brief about what are the various prerequisites we need during extensions. So now we will look at how we get to know which are the respective components associated with your page and your region. This is a screen shot of when we click on about this page link for the details of all the components and a more about the hierarchy of the page, As spoken earlier this link provides us the page information and the various business components that were used. On the top we will notice that , it depicts the path of the page. You will notice that the all the pages and components are deployed under oracle/apps folder. After the apps folder the respective application short name folder is present. We know now this page belongs to the application “pon”. Bellow when we expand all, we get the hierarchy of all the items present in the page. Now with respect to the controller, the entire pagelayout contains a controller, which we can view in the controller column. The topmost controller is known as the root Controller. We search for the respective item in the hierarchy, it may be so that the particular region has its own controller. As we have taken an example of adding the Scaled weight column in the table, we search for that item in the hierarchy. It may be so that the region containing the table may have its own controller. The similar is with respect to the AM. The AM also are depicted in a separate column. We will notice that most elements have its own VO and view attribute. This is because during the creation of the page. The elements are provide with the view object and a view attribute if required, We can always traverse to the particular element we need and know the respective VO and view attrribute. This page contains a sections known as “Business components ”
As we have taken the example of adding a new column called as scaled weight in the seeded table. This is one good example where we would require extending a view Object. During extension we should always make sure the xml files and the class files are brought from the server to your local development machine. Lets let us now see how we extend a view object.. To extend a vo we right click on the project and say New view Object. First screen shot depicts us how to create a new VO. Now you will be asked to provide the package name and the name of your new vo. Since we are extending the vo, we need to specify the path of the seeded VO .
On click of the next button you the above window will appear. On the left hand side you will view all the links which will show the details of the seeded VO. Will discuss some of these links. The first is the Attributes. This link shows all the attributes with respect to the VO. There are two types of attributes. One is a transient attribute and another is called calculated attribute. A calculated attribute is an attribute which is mapped to a sql attribute. Next is the SQL statement. We can always update the sql statement to satisfy our new requirements. This sql statement can updated if and only if the VO is created in expert mode. Java link. This is where we get an option of selecting whether we would like to generate the impl or the rowImpl files. This is about creating your new extended view object.
Now this extended VO has to be deployed to the server and should take affect in the application. First we should deploy these xml files and the class files to the server. Secondly we need to substitute the old VO with the new extended vo. This substitution is done by going to project properties and click on the substitution tab. This is a screen shot showing the substitution screen. On the left we need to specify the seeded vo and on the right we specify the new extended VO. When we add this , we will notice a new entry is created in the jpx file of the project. This file will have the new VO substituted by the old VO. Now these substitution has to be deployed to the server, this is done by running the command “jpximport”. Now how do we check whether our substitution was successful or not. 1 : we can check by executing this class jdr_util in the sqldeveloper. Listcustomizations lets you know if your substitution was done successfully. 2: we can go to about this page and check whether the Old VO is now substituted with the your new VO.
A controller is mostly extended when we want to handle a event or handle the rendering of an UI element.
So far, we have talked about extension. Let us quickly take a look at customizing, which basically means creating new pages and associated bc4j objects. Here you don’t have to extend VOs,EOs,AMs but create new ones. When you want to write new application(s) which want to use EBS database, there are couple of approaches you can think of Latest EBS 12.1.3 comes with APEX engine which is Oracle’s tool for quickly developing web UIs. Oracle E-Business Suite delivers a wide range of functionality to handle core areas of your business processing needs. However, there are situations where you want to extend your information systems beyond the range of Oracle E-Business Suite. Many times these necessary extensions are meant to handle unique industry conventions, specific customer requirements, or perhaps to offer some other competitive edge. Sometimes these change requests are simple enough, but other times more extensive customizations are needed. In these scenarios, Oracle Application Express, also known as Oracle APEX, provides an easy way to create supplemental applications that are easily integrated with your Oracle E-Business Suite and its data. Your new applications can either be stand-alone or fully integrated. You can use technologies like ADF to use independent applications just using EBS database.