Create a Jar file for your Shared Code

Advanced Oracle ADF 12c Course View|Create Shared Library
20 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€67.24
List Price:  €96.07
You save:  €28.82
£55.68
List Price:  £79.55
You save:  £23.86
CA$100.66
List Price:  CA$143.82
You save:  CA$43.15
A$111.82
List Price:  A$159.75
You save:  A$47.93
S$94.88
List Price:  S$135.55
You save:  S$40.66
HK$543.79
List Price:  HK$776.87
You save:  HK$233.08
CHF 62.67
List Price:  CHF 89.54
You save:  CHF 26.86
NOK kr792.28
List Price:  NOK kr1,131.89
You save:  NOK kr339.60
DKK kr501.55
List Price:  DKK kr716.53
You save:  DKK kr214.98
NZ$123.71
List Price:  NZ$176.74
You save:  NZ$53.02
د.إ257.07
List Price:  د.إ367.25
You save:  د.إ110.18
৳8,328.16
List Price:  ৳11,897.89
You save:  ৳3,569.72
₹5,958.01
List Price:  ₹8,511.81
You save:  ₹2,553.80
RM314.25
List Price:  RM448.95
You save:  RM134.70
₦108,236.03
List Price:  ₦154,629.53
You save:  ₦46,393.50
₨19,398.69
List Price:  ₨27,713.60
You save:  ₨8,314.91
฿2,394.21
List Price:  ฿3,420.45
You save:  ฿1,026.24
₺2,465.01
List Price:  ₺3,521.60
You save:  ₺1,056.58
B$426.13
List Price:  B$608.79
You save:  B$182.65
R1,290
List Price:  R1,842.93
You save:  R552.93
Лв131.30
List Price:  Лв187.58
You save:  Лв56.28
₩101,582.03
List Price:  ₩145,123.41
You save:  ₩43,541.37
₪254.54
List Price:  ₪363.65
You save:  ₪109.10
₱4,098.92
List Price:  ₱5,855.86
You save:  ₱1,756.93
¥10,967.38
List Price:  ¥15,668.35
You save:  ¥4,700.97
MX$1,406.50
List Price:  MX$2,009.38
You save:  MX$602.87
QR254.06
List Price:  QR362.96
You save:  QR108.89
P963.25
List Price:  P1,376.14
You save:  P412.88
KSh9,053.20
List Price:  KSh12,933.70
You save:  KSh3,880.50
E£3,568.78
List Price:  E£5,098.48
You save:  E£1,529.69
ብር8,687.63
List Price:  ብር12,411.43
You save:  ብር3,723.80
Kz64,250.82
List Price:  Kz91,790.82
You save:  Kz27,540
CLP$69,297.02
List Price:  CLP$99,000
You save:  CLP$29,702.97
CN¥510.87
List Price:  CN¥729.84
You save:  CN¥218.97
RD$4,243.89
List Price:  RD$6,062.96
You save:  RD$1,819.07
DA9,435.69
List Price:  DA13,480.14
You save:  DA4,044.44
FJ$162.05
List Price:  FJ$231.51
You save:  FJ$69.46
Q536.99
List Price:  Q767.16
You save:  Q230.17
GY$14,580.66
List Price:  GY$20,830.41
You save:  GY$6,249.74
ISK kr9,757.30
List Price:  ISK kr13,939.60
You save:  ISK kr4,182.30
DH701.41
List Price:  DH1,002.06
You save:  DH300.64
L1,291.33
List Price:  L1,844.84
You save:  L553.50
ден4,135.36
List Price:  ден5,907.91
You save:  ден1,772.55
MOP$557.92
List Price:  MOP$797.07
You save:  MOP$239.14
N$1,283.07
List Price:  N$1,833.03
You save:  N$549.96
C$2,564.57
List Price:  C$3,663.83
You save:  C$1,099.26
रु9,479.94
List Price:  रु13,543.35
You save:  रु4,063.41
S/259.51
List Price:  S/370.75
You save:  S/111.23
K282.61
List Price:  K403.75
You save:  K121.13
SAR262.99
List Price:  SAR375.71
You save:  SAR112.72
ZK1,928.73
List Price:  ZK2,755.44
You save:  ZK826.71
L334.62
List Price:  L478.06
You save:  L143.43
Kč1,690.23
List Price:  Kč2,414.72
You save:  Kč724.49
Ft27,882.67
List Price:  Ft39,834.10
You save:  Ft11,951.42
SEK kr772.23
List Price:  SEK kr1,103.23
You save:  SEK kr331
ARS$71,547.27
List Price:  ARS$102,214.77
You save:  ARS$30,667.50
Bs481.59
List Price:  Bs688.02
You save:  Bs206.42
COP$305,890.51
List Price:  COP$437,005.17
You save:  COP$131,114.66
₡35,162.35
List Price:  ₡50,234.08
You save:  ₡15,071.73
L1,769.11
List Price:  L2,527.41
You save:  L758.30
₲543,432.39
List Price:  ₲776,365.26
You save:  ₲232,932.87
$U3,131.93
List Price:  $U4,474.38
You save:  $U1,342.44
zł286.59
List Price:  zł409.44
You save:  zł122.84
Already have an account? Log In

Transcript

Hello in this video, I will show you how you can create a shared library. This library will have two things first thing will have your template, your CSS, your icons, your imaging, which you can use in multiple PDF application. And I think I've talked about this before in this course, second point will be the whole code which you usually use at any ADF application. During this course, I talk about how you can get that attribute from specific a trait or how you can execute a operation from the budget definition how you can use a cookie how you can show Baba from the back been, so you have a lot of shared code will be used in all the different location. So for the best practice, you should create your own shared library, as this library should be deployed in one place in WebLogic, and makes ETF or ETF application point to this library.

In this course I will show you how you can do all of this. In this video, let us create a shared code which we usually use it in our if application we need to create this shared code in one place and you can use this library at any diff application you will develop. So, it does not create a simple application or custom application because some application and this application will be my EDF sure who occasion okay because and we can use this we can call this my shear good okay and finish this is just simple brushing application. Let us go to the feature and let us sorry to go to the library And library which we need to use we need to use ADF common long time we can use it it faces from time we can use ADF model is the wrong time if controller okay I think we need some clarity to model and very efficient is because we will use the code in our boy into the model and if you so let us now create a class, we can call this class, my PDF So, this utility clause will have all All function which you will need while developing any diff application or your roads, most of us the common good we usually use at any default application here.

Let's see what is here. Okay, so one library is missing let's add it let's add meds runtime dependency, okay. So, this is a library which I added in this project, so that it will have all these functions can be run it let's quickly go through this function. This is as I told you, this is a common library, you will have to use you can use it if application so we should use this code as a shared library at Unity publication. It started with a private methods. So, you can skip this private method I will go quickly to the public method which you will use here get a default EDF application module.

So, if you want to get your application module actually this is will be used in some function to refresh view object to clear view object just to be sure that your data control is module data control. If you have a different data control you can change it here from here. This is a your data control. So, if you have here AB module data control in your EDF application, you should write it here a module that if you rename this you should rename it here. So, is that your library should be should be good. So, if you if your PDF library will have all By default emulator controls so be sure that your data controller native application should have the same name.

Okay, so this is continue here This function will get is a traitor you just send as a traitor name from your widget definition and it will return the result. If you want to execute enumeration like commit rollback Nick Scruton search just to call this function and since operation name like commit, of course you be sure this operation is existence average definition. Otherwise you will get no pointer exception. If you want to commit the change at any time in your code in the back pain you want to see cute is a commit you can execute called the commit. If you want to call rollback you can call a function rollback. If you execute rollback it actually it will set the current row of the three to two the first row but in case if you want to keep after the book is a roll back, keep control as as it is without changing you can call rollback and DB in the same current row or in the current row.

This is for database transaction clinical good the default database transaction, if you find component if he ever in a publication, I told you if you want to access component in your code, you will go to the binding isn't it? If you select For example, this is our if application before So, if you open any page and select any component and you want to use this component in the back being so that you can manually manually work was it we use a binding barbarity here in the fonts it we use the binding and we bind this component is affected. But in case if you want to get a component wizard we want to get you want to get it from the three hierarchy rule exists, you can call this function and send the component ID, the component ID will be for example, if you want to get the hundred books, you should, you should get it from the ID which has been in books.

Id, but because officers are big templates, so be sure that page template is PT one, Xin should be like quantum, then it should be a pendant books one this is will be the like this. So this is should be the full ID which is a component so that it will be able to get this should be a better book, so I don't remember it, so, I just read any name, so, it should be this. So, what you should send here, you should send PT one column, then when that box ID and synthesis ID to the final component and this We'll return use your component. This is another way you can get a component from being without using bind property. If you want to show up as I showed you before, you can just call this function since the mobile ID and the mobile will be open.

This is show Bob but if you want to make this more aligned to specific ID in that case, you can send the mobile app name and the component which you want this book to be aligned to it. If you want to see attribute in the traitor you can quote it repeatedly to just send that return name and what is attribute name and the value of the attribute and it will set the value here is a get if you have a current a traitor and you want to get value from the attribute so you can call it since the return name and attribute name and this function will return a value. If you want to open any any URL in a new window, you can send a URL to this function and this function will open it in a new window. This is If you want to get a connection, if you want to write a Java or SQL statement and you'd like bean and you need to get a connection, you can call this function.

If your talk was a session scope if you want to put values in session scope or get value from session or bit both value in that equal scope and get value from request scope, this is if you want to get a string from bundle if you want to get value from the source bundle you just send a base name and the key is a business name will be your boss to that you want to for example, here in our example, it should be view dot view controller bundle, if you right view dot view control bundle and send it here and is a key for example, the key will be first it will be in English secure will be finished so it returns a value first. This is in case if you want in your Java code to get value from our source. But if you want to know the current location, Just to call this function get a big name is a big name it will return user user current page name.

If you already have application has 5060 pages, and you want the code to be executed only in a specific page, you can call this function, this function will return the current page name. And you can write your own or your own code. If you want to refresh the whole page, you can call this function in your native code or your in your back in native code. If you want to navigate to a specific page, you can call this function and just since outcome, if you make some changes in the current throw, and you want to cancel this change without invoking rollback, because I told you drop back will retake the current rule as a first rule. So if you want to be as the same rule and you just want to cancel this change, you can just call cancel change and since a traitor not a traitor name, if you want to show error message nubuck been you call this function and since a mission message if you want to show successful message or if you want to show a warning message you can call this function.

If you want to refresh the whole view object, you can call refresh view we can send the view object name What is the view option in the view object which exists in under your control in that case, you can send department if you want and to this function and it will refresh the view object. If you want to refresh by a traitor name, instead of view name, you can send a traitor name to this function and it will refresh the address. If you want to refresh the traitor itself, you can call this function get the sum of attributes. So if you have for example, salary in the if you have a table called employee and this table has a salary and you will get the sum of this salary, you can call this function and this function should send later name and its return name And attribute name, for example salary and it will loop over it and the return the sum, okay.

But if you get any null pointer exception because of the number of rows and a traitor is greater than 25 go to the big definition and select say three to hear and set a range size to be minus one minus one it will fetch the old row is it 25 fro if you use this function and return null pointer exception, you just be sure that a traitor which you sent it here has a range size minus one. Get some more for three better as long as this will return as a double, double if you want as long as you can, you can add to call this function. If you want to refresh a component. Sometimes you need to refresh a component component in the back being so you want to mix some code and after that you want to refresh some component, you can go refresh component and since component for localization if you want to sit as a browser localization if you want to get the current localization, if you want to upload file, you can send the file location paths and the file name and this function will upload the file to this location.

Okay, if you want to the route file as well, you can send the file name as it will notify name. It is sequence to this value in Oracle Database if you will have a database sequence and you need to get sequence because venue you can call this function. If you have a view object and you want to clear all rows in the view object you can call this function to clear all rows. This is closed statement if you write a SQL statement in Java, you need to close the prepared statement and the result set you can call this function. If you have Add decimal value you and you want to get around to the decimal value. For example, if you have a result like this, and you just want to get a 3d small value, so you can call this function and set the street so it would be like this, someone arithmetic operation you can do in your application and you'll find the result will be number like, like even more than this something like this too big.

And it's a bit you just want me to splay 15.2. So in that case, you can call this function sends a double and the cost should be one. Here a usually use a lot. If you have a select statement and you want just to get a description or a name this says select the statement or return only one row and one description. For example, if you want to get to the department name, and you have department ID and you want to get department name. So you will just let the bottom name from the bottom where the document ID equals ID and since this is secured statement in this function and this function will return the department the same if you want to get a double value.

For example if we were to get select a salary or sum of salary from employees sit this since this is equal here and it will return the double value. here if you want to do things along value, for example if you want to sit to get the count of all in between for department so your your right select account from departments were for employee you were a department equal since this is secure here and it will return along which is a result of this SELECT statement. If you want to execute the mail, like insert or update or delete SQL statement, if you have update department where department equal just sent this SQL statement here and it will execute the SQL statement. If you want To get a view object by name, you just call this get field by name. And you can work with a few objects like if you send department if you want here, it will return an object to the view department and you can do whatever you want you can change the where clause, you can get the control you can override whatever you want you can do once you get the view object here if you want to get the object from a traitor so just write sends a traitor name and it returns a view object.

This make table selection row as a control, I talked about this in the listener of the table selection listener. So I wrote here a function you can call this function signal value to all rows in a tree attribute. For example, if you have a table and you want to set value to old row, you just send the traitor name and attribute name and the value and this value will be set to all rows in this attribute or is it a tribute sometimes it a face it while I'm using Just hurry. What if you need to get a real boss for a file folder just since a file or folder it need to return the real parts of this folder. Because after you deploy your application to the server, it will deploy it to some boss and you want to get a real boss for the file, you just send it here and returns area.

Clear table filtering over the columns, the tables are filtering if you all you want programmatically to clear this filter, you can just call this function and insensitive table component. So you should bind the table component in the beam since this table to this function, and this function will clear the old filter over the column. Reset query filters. This is a Bennett query if you have search screen, and you want to programmatically to clear the field you can call this function. Citizen focus if you want to use JavaScript in your back pain and you want to Focus offs attribute or as a course or in some specific verticals you just sent, or the focus to the any component, you just sent a component ID, and it will focus to this component ID. If you want to create a new file programmatically, you can call this function.

If you have a property file and you want to edit the file, you can use this function or read value from blogger to file because sometimes you need to store some value in a boggart file and you want it if system to get the value from birth divide, you can use this function of course they go quickly because there are a lot of function I just want to go quickly over it. After that you can if you want to get the current route from a traitor you call this function. If you want to consider changing the view objects just since the view object name and it will consider the changes for all rows in this view object. Or you can constituents in iterate or reconsider a traitor name and you We'll consider all these changes for roles for just a trade. Okay this is a private message should be sent up.

This is if you want to get the status of the role if you if you are in the programmatically have a role and you want to status if it is new or no it will not if you want to know is this is a distro is just user created it all this is all the rule exists in the database before so if you want to know is this row is a new one sorrel user is inserted but still not committed. You can call this is a row instead new and since a row and it will return true or false. And the same is if you want to zero is updated or not just the center is a row here and it will send you true or false if it is updated or not. Or if you want to get the states over specific row just sends a row here and it will return the status of the row.

This is justified Want to get a client component computer name, this is a cookie function which we use. So, all this almost common function which we use, you can use at any ADF application generic function, if you have your own function you can add it here. So now we are prepared let us go to the application so now we are prepare our shared code here in one place. Next video I will show you how you can deploy this as a shared library in in our project So, see you next video

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.