Drop Down List Listener

Advanced Oracle ADF 12c Course View|Working With UI Components Listener
14 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
€61.47
List Price:  €87.82
You save:  €26.35
£52.60
List Price:  £75.16
You save:  £22.55
CA$96.89
List Price:  CA$138.43
You save:  CA$41.53
A$109.61
List Price:  A$156.59
You save:  A$46.98
S$91.80
List Price:  S$131.16
You save:  S$39.35
HK$543.02
List Price:  HK$775.77
You save:  HK$232.75
CHF 57.75
List Price:  CHF 82.51
You save:  CHF 24.75
NOK kr729.64
List Price:  NOK kr1,042.39
You save:  NOK kr312.75
DKK kr458.96
List Price:  DKK kr655.69
You save:  DKK kr196.72
NZ$117.11
List Price:  NZ$167.31
You save:  NZ$50.19
د.إ257.07
List Price:  د.إ367.26
You save:  د.إ110.19
৳8,502.97
List Price:  ৳12,147.63
You save:  ৳3,644.65
₹5,968.05
List Price:  ₹8,526.15
You save:  ₹2,558.10
RM306.06
List Price:  RM437.25
You save:  RM131.19
₦113,103.14
List Price:  ₦161,582.84
You save:  ₦48,479.70
₨19,657.95
List Price:  ₨28,083.99
You save:  ₨8,426.03
฿2,340.32
List Price:  ฿3,343.46
You save:  ฿1,003.14
₺2,682.01
List Price:  ₺3,831.60
You save:  ₺1,149.59
B$401.01
List Price:  B$572.90
You save:  B$171.88
R1,309.52
List Price:  R1,870.82
You save:  R561.30
Лв120.38
List Price:  Лв171.98
You save:  Лв51.60
₩100,465.95
List Price:  ₩143,528.93
You save:  ₩43,062.98
₪255.41
List Price:  ₪364.89
You save:  ₪109.47
₱3,954.74
List Price:  ₱5,649.88
You save:  ₱1,695.13
¥9,970.18
List Price:  ¥14,243.72
You save:  ¥4,273.54
MX$1,371.19
List Price:  MX$1,958.93
You save:  MX$587.73
QR254.84
List Price:  QR364.07
You save:  QR109.23
P956.04
List Price:  P1,365.84
You save:  P409.79
KSh9,056.70
List Price:  KSh12,938.70
You save:  KSh3,882
E£3,566.46
List Price:  E£5,095.17
You save:  E£1,528.70
ብር9,391.24
List Price:  ብር13,416.63
You save:  ብር4,025.39
Kz63,830.88
List Price:  Kz91,190.88
You save:  Kz27,360
CLP$65,983.99
List Price:  CLP$94,266.88
You save:  CLP$28,282.89
CN¥510.01
List Price:  CN¥728.62
You save:  CN¥218.61
RD$4,151.63
List Price:  RD$5,931.15
You save:  RD$1,779.52
DA9,261.20
List Price:  DA13,230.85
You save:  DA3,969.65
FJ$158.20
List Price:  FJ$226.02
You save:  FJ$67.81
Q539.06
List Price:  Q770.12
You save:  Q231.05
GY$14,641.15
List Price:  GY$20,916.83
You save:  GY$6,275.67
ISK kr8,908.32
List Price:  ISK kr12,726.72
You save:  ISK kr3,818.40
DH647.77
List Price:  DH925.43
You save:  DH277.65
L1,209.12
List Price:  L1,727.39
You save:  L518.27
ден3,782.50
List Price:  ден5,403.80
You save:  ден1,621.30
MOP$559.32
List Price:  MOP$799.06
You save:  MOP$239.74
N$1,299.68
List Price:  N$1,856.77
You save:  N$557.08
C$2,575.32
List Price:  C$3,679.18
You save:  C$1,103.86
रु9,558.70
List Price:  रु13,655.87
You save:  रु4,097.17
S/258.79
List Price:  S/369.72
You save:  S/110.92
K285.39
List Price:  K407.72
You save:  K122.32
SAR262.53
List Price:  SAR375.06
You save:  SAR112.53
ZK1,985.74
List Price:  ZK2,836.90
You save:  ZK851.15
L305.98
List Price:  L437.14
You save:  L131.15
Kč1,537.76
List Price:  Kč2,196.89
You save:  Kč659.13
Ft25,057.28
List Price:  Ft35,797.65
You save:  Ft10,740.36
SEK kr673.28
List Price:  SEK kr961.88
You save:  SEK kr288.59
ARS$81,431.23
List Price:  ARS$116,335.31
You save:  ARS$34,904.08
Bs483.57
List Price:  Bs690.85
You save:  Bs207.27
COP$300,992.45
List Price:  COP$430,007.65
You save:  COP$129,015.19
₡35,192.79
List Price:  ₡50,277.57
You save:  ₡15,084.78
L1,814.26
List Price:  L2,591.91
You save:  L777.65
₲559,805.85
List Price:  ₲799,756.92
You save:  ₲239,951.07
$U2,934.99
List Price:  $U4,193.03
You save:  $U1,258.03
zł263.17
List Price:  zł375.98
You save:  zł112.80
Already have an account? Log In

Transcript

Hello, in this video, I will show you how you can use a drop down list listener so that you can catch any value changes that don't list and you can do anything I will give you an example we need to implement it together that now if you have here list of employees, you want to drop the list of the department to be exists somewhere and once user select this department, they will we should be filtered depending depending on the selected department. So I need a drop down list here. I need to have a table of all in the UI and a drop down list over it was was the departments so once the user selected specific department the table should be filtered. The question here this drop down list the department drop down list should be birth of which view object if you want to display some specific component, some component Some, like don't don't list like ambu tickets, you just want to get the value and do something and you want this component to be part of the model view object, you can create a dummy view object and use this attribute in your page, I will show you how you can do this.

Now, I need to have in the page a list of the departments this what I need. So, I need to create a tribute in a view object and I will define this to value with a default for the department to read the value from the department. So which view object actually I will do you can say I can create a programmatic view object I will say no it is not a good way to do it because programmatic view object. Initially once you enter the beach, there is no row. So the drop down list will be disabled because there is no row you have to create throw in from this programmatic view objects to set the drop down list will be a beer. So I will tell you what actually you should you should do.

You can carry it and you View object okay. You can even call it dummy view object or you can use this attribute in the view object is this view object at anywhere in your application. But you want to be sure this view object will always return to one row. So that set tribute which you want to put into the beach should be enabled. And I would select here SQL query, and you just write Select star from do that's all this is, you sure will return one row, this query you will be short it will save you object will have one row. Okay, so next, next, so it will create a dummy column.

Okay nickers nickers nickers. We don't in MPL, we just want to be like that. And we can add this view object into insights ADF business component, if modern, you just finish okay attribute Here you will find one attribute called dummy then I will add another attribute here call the list okay and it should be updatable bolos because we will update it and it should get the department from the water is integrated we should make this integrate as well. So I will select the same type to go Okay, so here I can just a dummy view the query is select star from the one so that I will be sure this object will return one roll so any attribute I will use in the ADF page I We'll be sure it will be enabled. So of course, in case if you want to display some form the user should enter some value.

And you want to take this value in the model layer and they do something but this form should not be part of the actual view object. In that case, you can create like dummy view object and add any attribute anything you want was just to be sure that updatable to be almost. So here I create a dummy object with Select star from the work to be sure this field it will always return one row did I add my last attribute which I want to display this of department, so I will insert a table called the board minutes okay. And I should define this to value over this gives a value from department departments view and I will select department ID will map to this attribute and it will be listed value with department name. So here defined my list of values in the data control you will find this Dom if you exist and you will find here the department list is exists.

So, I will go to the tab here is a drop down list I will add here when in group because I need to component i need to track so, dummy view here to display the empty list as it will be some value. So, I will select here as a four and I just want I will remove system I just want my depth test. Okay, and I will display St. Louis as a tip Okay, so now let's just have a look on this page now before we start implementing the value change listener of the attribute Okay, so let's now go to the drop down list here. You will find here are departments and the list is open. Why because the role of the DOM if you don't have you has one role which is why it is open. Otherwise you'll find this is disabled.

So here I will see all the employees and here I can see the list of the department. All I need is Once I select the department, this table should be filter when I select this department, this table should be filtered and so on how you can implement something like this. So, I will go to the drop down list here this is just add a little bit of separator between space between between both of them. So, in this Val in this select one choice component, I will go to the behavior tab and I will see what is the listener the existence of behavior actually you should do this for any ADF component even the future if aura can get a new component if you want to know what is the listener you just select a component is a behavior you can check what is exist you will find here value change listener.

So, I will go to the value change listener it selected my bean and they will write it the list value you change this not Seemed like input tickets to be sure that once user select the value it will hit backbeat you have to set immediated submit equal to true. So, let's back go to our pack been here if you get this value change event, as I told you any any listener will have an object with will receive an object of the event. So you can if you get this and get new value, you will find you can get the new selected value. So let us display city Liquid dipped okay. And we will do the same what we did to filter the few objects in blue if you object. So, I will go to the binding you will find the painting here I will go to the binding from the binding I will get the inbuilt v v one I traitor, and from the review is from a traitor I will get the view object and I will sit it will close off the department ID and I will send the selected department like this and they will re execute the query.

How do you know that this is a three to nim, which is a table is going to do so you can go to the beach. Here is my table. You can select this table, right click, go to binding and it should It is point two which a traitor you will find point two in between if you want I traitor. This is a traitor, which we wrote it here. Okay, so I will get the selected value gets a traitor view object city will close of the view object to the selected value and execute query. So let's think is I need this table to be refreshed once the users select the entire document.

So I will take the idea of this and they can refresh the table or even you can say interpretations. I mean we're on so little stipulations, I mean, you're not like this. It was no throw a tour on it and see how it will. Okay, so this Now go to drop down list here and from the department I need to select administration department, you will find it is filtered search department. And here you'll find the selected department is 10 which is administration if I select for example, it you will find it is filtered, the mbv was it and the selected value is here. So, this is how you can deal with values usually listener or the selected value in terms of drop down list.

One One more thing I need to tell you about it, we almost do it if you want to make the selected value in the current throw. In the value change listener, you should do something like this Now, if for example, if your intervention is not, if you try to go to, to the dummy view, a one a traitor and they get the current throw, and they get the value, you will not get the selected value. Currently, we get the selected value from the value, change even object getting new value, but sometimes you want the current current selected value current attribute updated with the selected value inside volution Islam in that case, you have to add this two lines. You have to make process update. What does it mean? It means once you select the value, the current row now we'll have this value insight Z value change listener Good okay.

So anyway, I if you don't understand this, that's fine because sometimes the value change listener will be done insight is a threat or demean a threat or from somebody if you have here drop down list and you select it. And in the listener itself, you want to get the current row gets the department you will find it gets all the value unless you add these two lines. In that case, if you are inside city want to change listener and you say, get a department to get the current role TO GET IT department ID you will find the updated or the selected value will be returned. This is how you can work with value change listener of the drop down list. This is one of the important things you should no negativity or jump into the pub. It's nice to see you in the festivities.

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.