Write Java Code in Application Module

Complete Oracle ADF 12c Course for Beginners Write Java Code in Model and View Layer
9 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
€65.39
List Price:  €93.41
You save:  €28.02
£55.92
List Price:  £79.90
You save:  £23.97
CA$96.01
List Price:  CA$137.16
You save:  CA$41.15
A$107.15
List Price:  A$153.08
You save:  A$45.93
S$95.13
List Price:  S$135.90
You save:  S$40.77
HK$547.14
List Price:  HK$781.66
You save:  HK$234.52
CHF 63.86
List Price:  CHF 91.23
You save:  CHF 27.37
NOK kr775.40
List Price:  NOK kr1,107.76
You save:  NOK kr332.36
DKK kr487.78
List Price:  DKK kr696.86
You save:  DKK kr209.07
NZ$118.01
List Price:  NZ$168.60
You save:  NZ$50.58
د.إ257.06
List Price:  د.إ367.24
You save:  د.إ110.18
৳7,680.49
List Price:  ৳10,972.60
You save:  ৳3,292.11
₹5,842.03
List Price:  ₹8,346.11
You save:  ₹2,504.08
RM332.86
List Price:  RM475.54
You save:  RM142.67
₦86,437.65
List Price:  ₦123,487.65
You save:  ₦37,050
₨19,491.96
List Price:  ₨27,846.85
You save:  ₨8,354.89
฿2,586.09
List Price:  ฿3,694.58
You save:  ฿1,108.48
₺2,265.39
List Price:  ₺3,236.41
You save:  ₺971.02
B$363.53
List Price:  B$519.35
You save:  B$155.82
R1,302.64
List Price:  R1,861
You save:  R558.35
Лв127.90
List Price:  Лв182.73
You save:  Лв54.82
₩96,270.48
List Price:  ₩137,535.16
You save:  ₩41,264.67
₪262.29
List Price:  ₪374.71
You save:  ₪112.42
₱4,033.94
List Price:  ₱5,763.02
You save:  ₱1,729.07
¥10,867.12
List Price:  ¥15,525.12
You save:  ¥4,658
MX$1,187.12
List Price:  MX$1,695.96
You save:  MX$508.84
QR254.93
List Price:  QR364.20
You save:  QR109.27
P994.08
List Price:  P1,420.18
You save:  P426.09
KSh9,360.69
List Price:  KSh13,372.99
You save:  KSh4,012.30
E£3,358.63
List Price:  E£4,798.26
You save:  E£1,439.62
ብር4,003.77
List Price:  ብር5,719.92
You save:  ብር1,716.15
Kz58,546.63
List Price:  Kz83,641.63
You save:  Kz25,095
CLP$67,216.99
List Price:  CLP$96,028.39
You save:  CLP$28,811.40
CN¥506.70
List Price:  CN¥723.89
You save:  CN¥217.19
RD$4,073.53
List Price:  RD$5,819.58
You save:  RD$1,746.04
DA9,418.34
List Price:  DA13,455.35
You save:  DA4,037.01
FJ$158.31
List Price:  FJ$226.17
You save:  FJ$67.86
Q543.96
List Price:  Q777.12
You save:  Q233.16
GY$14,650.29
List Price:  GY$20,929.88
You save:  GY$6,279.59
ISK kr9,815.39
List Price:  ISK kr14,022.59
You save:  ISK kr4,207.20
DH707.71
List Price:  DH1,011.06
You save:  DH303.35
L1,237.78
List Price:  L1,768.33
You save:  L530.55
ден4,025.24
List Price:  ден5,750.59
You save:  ден1,725.35
MOP$563.96
List Price:  MOP$805.69
You save:  MOP$241.73
N$1,304.33
List Price:  N$1,863.42
You save:  N$559.08
C$2,570.38
List Price:  C$3,672.13
You save:  C$1,101.75
रु9,397.27
List Price:  रु13,425.24
You save:  रु4,027.97
S/263.43
List Price:  S/376.35
You save:  S/112.91
K270.11
List Price:  K385.89
You save:  K115.77
SAR262.49
List Price:  SAR375.01
You save:  SAR112.51
ZK1,873.89
List Price:  ZK2,677.10
You save:  ZK803.21
L325.37
List Price:  L464.84
You save:  L139.46
Kč1,643.47
List Price:  Kč2,347.91
You save:  Kč704.44
Ft25,458.03
List Price:  Ft36,370.18
You save:  Ft10,912.14
SEK kr764.90
List Price:  SEK kr1,092.76
You save:  SEK kr327.86
ARS$61,327.27
List Price:  ARS$87,614.14
You save:  ARS$26,286.87
Bs483.57
List Price:  Bs690.85
You save:  Bs207.27
COP$273,218.78
List Price:  COP$390,329.27
You save:  COP$117,110.49
₡35,710.66
List Price:  ₡51,017.42
You save:  ₡15,306.75
L1,733.65
List Price:  L2,476.75
You save:  L743.09
₲524,442.73
List Price:  ₲749,236.02
You save:  ₲224,793.28
$U2,683.09
List Price:  $U3,833.15
You save:  $U1,150.06
zł283.24
List Price:  zł404.64
You save:  zł121.40
Already have an account? Log In

Transcript

Hello, let's continue talking about writing Java code in the modern layer, I talk about entity object and if you object this so this video will talk about its application module. So, once you have an application module you'll find a Java tab as well same like entity and view object. So, you will it exists you will find here application module and this is a class which you can write your own Java code press OK. Here is a application module ml Okay, what exactly is this application module have? It has all views as you as you know here is the data model you can add all view which you want to be used in the model interview layer, it will appear in the data control. So, if you will add it here as application module.

So, if you will For application module embell, you will find all the view which is application would you will has. So, first thing you can do you can deal with this department views or employee view you can do it like here to control the view object from here like if you want to sit create or whatever this is one things you can do second thing from the module emin you can write some code and use this code in the view layer this is what I will show you how you can write some code here and code this code from the view layer. Their usage of the application when you think you can write some code will apply for all application level like for example, display successful message who wants to receive his breast in any safe or commit operation will have In the ADF application you want to display this message.

So, this is what I will show you how to do this in application module. So, most important thing here how to can write your own your own message and you can call it from the view layer. So, let us now try to write public. For example, Boolean if you want to display output, create new dipped from application module m, okay and I want to set some parameter okay or make it easy now just to create it so what how you can now create a new row is a view object live in here. We was a department view one. So we should get a department if you want, because here we drag department view one.

So, you can choose a department view one here. So I will say get the department to view one dot create. Can you throw here, okay? And this is we're here you can press Ctrl and the prisons to go it will return row so we can say here, throw the throw equal, GET IT department to carry through. Here you have to import you press ALT Enter. And you can select or if you do choose to throw Okay.

Then I will say now this is the dip throw. Once I created the Euro, you can set anything you want you can say dot set attribute. Okay, so you can go for the department view here, you can go open the department to get attribute name. For example, I will set a department ID. This is like a default value. okay for you to department name copies This works My name I would say deep name from application module.

Okay, you can say as well Select here, press Control tracks row here, then I will take any other field like measure ID attribute the attribute manager ID and I will set it was 100 Okay. So now I need to insert first is this So, you can see get into what went view one dot insert, row, it dipped, Pro, this is a way how you can programmatically create a row from a view object, some attribute and insert row, this is same like create insert and the big reveal when to risk read insert, you will see it. So, here you can see for example here convert Boolean out equal false can write try catch here if any exception happened here, I will turn false. Here I will return okay. So Neato just actually, so here I will return true usings okay return true or return false. So, here I create some method on the method, I need to call it from the view layer.

As I said anything from the view layer, it should appear here in the data control, so that I will be able to use it in the view layer. So, how I can place this create here, you you can go here in the application module here Java you'll find here client interface versus, you will get your mess with just drag it here. And the breeze okay simple, easy things, refresh, or you can find it here straightaway. Just the straightaway so this is one month a powerful and one good feature you should care about it here is application module. Because it's application module you have all view object in under your hand, you can do whatever you want, you can get a department view here and sets a where clause to in other things, you can set the bind value to anything from here, you can create a new row so you can write your own business here.

And once you create your function here, you can go for the client interface and just drag this here and the case it will display in the data controller. Here insert a control is a programmatic Now, let's now try to drag this as a bottom. can drag this here, not here, let us drag it into action here. So let's drag it to the bottom here, you can drag it as a bottom. Here, if you want to see the output because there are a Boolean here you want to try if you open this, this is a return type, you can drag this return type as well here as an au tickers to see the result. If it is true or false just to see the output.

As I said, if you want to the boresha trigger, you can see this is okay, partial sum is true, that's fine. Here, you can add it to see see how simple it is. So let's now try to run this and see how it will work. Okay, so we have here second, a new Department for Education. Would you once they pressed on it you will find here department ID 502 This is the Berkman new forum application module and the manager is 100 means it is called my method and you can see here as a result is coming through. So, this is one of the good feature here is application module that you can create your own business function here.

You can make this function appear here in that data control I can drag it and you can call this function from the array. In this video I will show you something is new as application module level associated with you

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.