JavaScript Part 9

Advanced Oracle ADF 12c Course View|JavaScript in ADF Application
11 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
€59.88
List Price:  €85.55
You save:  €25.66
£51.91
List Price:  £74.16
You save:  £22.25
CA$96.55
List Price:  CA$137.94
You save:  CA$41.38
A$106.94
List Price:  A$152.78
You save:  A$45.84
S$90.06
List Price:  S$128.67
You save:  S$38.60
HK$546.11
List Price:  HK$780.19
You save:  HK$234.08
CHF 56.21
List Price:  CHF 80.30
You save:  CHF 24.09
NOK kr703
List Price:  NOK kr1,004.34
You save:  NOK kr301.33
DKK kr447.02
List Price:  DKK kr638.63
You save:  DKK kr191.60
NZ$119.09
List Price:  NZ$170.14
You save:  NZ$51.04
د.إ257.03
List Price:  د.إ367.21
You save:  د.إ110.17
৳8,520.17
List Price:  ৳12,172.20
You save:  ৳3,652.02
₹6,177.29
List Price:  ₹8,825.07
You save:  ₹2,647.78
RM295.62
List Price:  RM422.33
You save:  RM126.71
₦106,975.51
List Price:  ₦152,828.71
You save:  ₦45,853.20
₨19,868.89
List Price:  ₨28,385.35
You save:  ₨8,516.45
฿2,253.18
List Price:  ฿3,218.97
You save:  ฿965.79
₺2,887.40
List Price:  ₺4,125.04
You save:  ₺1,237.63
B$381.29
List Price:  B$544.72
You save:  B$163.43
R1,237.85
List Price:  R1,768.44
You save:  R530.58
Лв117.23
List Price:  Лв167.48
You save:  Лв50.25
₩97,299.65
List Price:  ₩139,005.46
You save:  ₩41,705.80
₪233.76
List Price:  ₪333.96
You save:  ₪100.19
₱3,982.74
List Price:  ₱5,689.88
You save:  ₱1,707.13
¥10,370.72
List Price:  ¥14,815.95
You save:  ¥4,445.23
MX$1,307.18
List Price:  MX$1,867.49
You save:  MX$560.30
QR254.81
List Price:  QR364.04
You save:  QR109.22
P1,007.37
List Price:  P1,439.16
You save:  P431.79
KSh9,042.70
List Price:  KSh12,918.70
You save:  KSh3,876
E£3,398.02
List Price:  E£4,854.53
You save:  E£1,456.50
ብር10,014.21
List Price:  ብር14,306.63
You save:  ብር4,292.42
Kz63,827.73
List Price:  Kz91,186.39
You save:  Kz27,358.65
CLP$68,047.07
List Price:  CLP$97,214.27
You save:  CLP$29,167.20
CN¥499.08
List Price:  CN¥713
You save:  CN¥213.92
RD$4,438.06
List Price:  RD$6,340.36
You save:  RD$1,902.30
DA9,089.14
List Price:  DA12,985.04
You save:  DA3,895.90
FJ$157.92
List Price:  FJ$225.61
You save:  FJ$67.69
Q537.12
List Price:  Q767.35
You save:  Q230.23
GY$14,646.12
List Price:  GY$20,923.93
You save:  GY$6,277.80
ISK kr8,575.17
List Price:  ISK kr12,250.77
You save:  ISK kr3,675.60
DH635.26
List Price:  DH907.55
You save:  DH272.29
L1,173.39
List Price:  L1,676.34
You save:  L502.95
ден3,696.82
List Price:  ден5,281.40
You save:  ден1,584.57
MOP$562.45
List Price:  MOP$803.54
You save:  MOP$241.08
N$1,241.62
List Price:  N$1,773.82
You save:  N$532.20
C$2,576.11
List Price:  C$3,680.31
You save:  C$1,104.20
रु9,866.78
List Price:  रु14,096.01
You save:  रु4,229.22
S/246.53
List Price:  S/352.21
You save:  S/105.67
K296.66
List Price:  K423.82
You save:  K127.15
SAR262.61
List Price:  SAR375.17
You save:  SAR112.56
ZK1,665.94
List Price:  ZK2,380.02
You save:  ZK714.07
L304.15
List Price:  L434.52
You save:  L130.37
Kč1,463.14
List Price:  Kč2,090.29
You save:  Kč627.14
Ft23,530.45
List Price:  Ft33,616.37
You save:  Ft10,085.92
SEK kr658.63
List Price:  SEK kr940.94
You save:  SEK kr282.31
ARS$95,361.78
List Price:  ARS$136,236.96
You save:  ARS$40,875.17
Bs483.93
List Price:  Bs691.36
You save:  Bs207.43
COP$279,578.30
List Price:  COP$399,414.69
You save:  COP$119,836.39
₡35,391.50
List Price:  ₡50,561.46
You save:  ₡15,169.95
L1,834.15
List Price:  L2,620.33
You save:  L786.18
₲504,626.01
List Price:  ₲720,925.20
You save:  ₲216,299.19
$U2,804.51
List Price:  $U4,006.62
You save:  $U1,202.10
zł254.73
List Price:  zł363.92
You save:  zł109.18
Already have an account? Log In

Transcript

Hello, this video will continue talking about JavaScript in native. In this video, I will explain how you can get the value of the input text and compares a value between him with tickets if you want to display a message or JavaScript message if the two fields has a different value. So, I will write here for JavaScript function. Okay, this JavaScript function, you can get the content of any tickets, you can get the content of any tickets by gets the element by ID and the gifts the input tickets and write the content in that case, it will get the content of their input text, which you will point to. So, I will get the two output or two content from the two input tickets and I will check if both of them is not equal to null or empty. I will check if what was the them equal to each other.

So, I can alert equal just remove this comment to see if it is equal, if it is different, it will erode not equal. So, you can display your own message. So, what I will do here, I will just send the two input tickets which I need to compare its value. For example, if this boss works for example, or sorry, email and this is confirm email and I just want to check both of them are equal to each other as JavaScript live or not. So, what I will do here I will take the ID of the first one which is 87 and 88 Okay. And I will go here and I will see it seven content and it could okay OK, now what actually is this take which I add here and here, this is because we are using this end operator.

So if I didn't add this tag, you will get an error even if you want for example, something like Greece or Zen or like this, without this tech, you will receive an error because your issues page. So, for example, if I remove this here and I remove this and I will use a normal Java function or script function as previous function, I will just add a normal JavaScript function. You will find here it will give you an exception here because this is it only we are in the JSF page. So, this means you will close a tag like this. You will notice a little Zen same in this and so, you can use any coin This operators in the normal unless you surround this function using this tech, okay, so this is why I add this here. So that I would be able to write something like a and or greater than or anything.

So now this example, you should be able to know how you can get the component of sorry, the content of the Ember tickets and how you can display the value of the input text. Let us now try to refresh and check the functionality of this. So, with this refresh, here's the image. I will right here. Okay, it didn't enter or didn't make anything. Okay.

So first thing I need to do is I need to point to this chick value. So this is one missing thing. So this is should have a client listener, this client listener has a keen interest but I can add another claim to this now, you can add multiple claims listener. So, as a click listener will be checked value and in the value change in the value change, I need to call check value in the value will change okay so let us now refresh. Now when I press E, nothing happened because I add here a condition set, both of them should have value. Okay, so let's add Yeesh www, so it display not equal.

If I remove this and write a, it is now equal. So this is how you can get a value of the input test in the JavaScript and how you can make some compare of this value and how you can display a message. So normally, if you enter in a value, and other value is okay, nothing will happen unless if you enter something different, you should display a lot of the message. This is one of the example of how you can read the input tickets the value in the JavaScript. So let's think I need to tell you about it is because I fixed it only one time in my life that the user want to disable. Right click was a bitch.

You don't even want to right click and do whatever you want. So right click here to disable it. So to disable right click on service users JavaScript function, just as this JavaScript function and right click will be disabled. So let us know back to the JavaScript here, before the resource, and you just write this function which Disable right? Click, this is what gets a document, the main, the whole document, and it will make disabled is a context menu. So I'm going to warn you it will be disabled.

So let us now try to refresh. And now right click, I am now right click nothing. I can't right click anymore. So to disable a right click, just put this function in the JavaScript to block area and it will disable the right click. So this is an example of how you can use JavaScript in EDF. Last thing I want to tell you about it is the idea of a component.

Currently, if we need to get oil as a component in the JavaScript, we just send the ID of the component like for example, this is a bending splitter. So we see here B is one We sent here, ps1 straightaway, the same, or the exact same bundle group, do it within the bundle group do it. So anything we need, we sent the component Id like 87 straightaway. So, actually, this is because we didn't, we didn't use a page template if you use pitch template, because here, we don't have any big template, but if you use pitch templates, this pitch template will have ID. So to send a component into JavaScript and to get it, you should try it big template, for example, bt one ID then column, then your component, it should be something like this. Okay, I will let you know as a general way, you know, which ID the JavaScript will be able To find your PDF component, because here this JavaScript will find the component and you sent the component Id even xebec been we sent here B two to B sub B two, because it will find component by ID B two.

But to know, which has which IDs you should send to JavaScript that JavaScript will be able to find your component. Simply you can go to the document and is the initial focus ID going to your component which you will access in JavaScript. So I will present it and you can open it cement your page and see what is the component you want to use in the JavaScript For example, I need to access Hispanic group to change it, I believe okay. So I find here this is the idea of subnet group and I will use this because actually this will be changed. If you use basil template or even better connection For example, if you want to access a table is a table if you point to the table here, which we have here, T one, it would be T one so you can use this T one as a JavaScript to find the component to get the table.

But if this table is surrounded with a bunch of collection it is try to surround this with a bunch of collection surround with better collection because we usually use a collection after set to one. Okay, in that case, let us try to point to the table again from the document. Yes, it does point to the table. You will find it now become a collection ID Xin chrome in table is that case you have to use this ID Inside a JavaScript method to get the component, for example, here or whatever, you need to get any combination of components in JavaScript here, for example, find component, you should visit case since the whole purpose. So in general, because of sometimes you will use a big template, sometimes not sometimes a table inside many collections sometimes not. So in if you don't know how to get the component ID, which you can send it to the JavaScript missile to get the component, or sometimes some user Tell me in JavaScript didn't return the second we can't find my component, it return on idle fight or whatever.

So you have to be double check that you sent a correct ID to the JavaScript function. So once you send the correct ID to the JavaScript functions, JavaScript will be able to find your PDF combined So to get this ID, as I told you just select the document. And in the initial focus ID, you can go into your document and whatever is returned to you, you can use it in the JavaScript. So that server script will be able to find your component. This is how you can use a JavaScript. If page.

Nick is a video we'll go to another feature. So see you next activity.

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.