Hi,
In this post we will see how to create select many Shuttle component in Oracle ADF.
af:selectManyShuttle component requires leading and trailing values as java.util.List you can create a List from your iterator or static values.
Download sample code
More info in this video
Happy Jdeveloping,
Zeeshan Baig
Showing posts with label LOVs. Show all posts
Showing posts with label LOVs. Show all posts
Sunday, October 3, 2010
Saturday, June 19, 2010
Display LOV on F9 Key in Oracle ADF
Hi,
Recently i learned from OTN forums how can we display LOV by pressing F9 key on field (which is Oracle forms default key to display LOV and migration to ADF would required developers to keep the common features alive) the answer is by using JavaScript we can control which key has been pressed by user or which mouse button is pressed without a round trip to server.
Lets get into example:
- Create Simple LOVs on Employees table's field 'DepartmentId' and 'ManagerId'
- Create metaContainer facet in af:document (Recommended area to put javascript code)
- In structure window right af:document and choose insert inside > JSF Core > facet
- Choose metaContainer from list and press OK
- Drag af:resource component to metaContainer facet from Component palette and choose type 'javascript'
- Go to page source and create a function showMyLOV as shown in the slide
Note: You can ignore any errors in the structure window regarding "Expected name instead of &."
- Add a client listener to the field you want to display Lov on F9
- Run the page and test
Download the example
More Reading on JavaScript implementation in Oracle ADF check Webuser Interface guide
Happy JDeveloping,
Baig
Recently i learned from OTN forums how can we display LOV by pressing F9 key on field (which is Oracle forms default key to display LOV and migration to ADF would required developers to keep the common features alive) the answer is by using JavaScript we can control which key has been pressed by user or which mouse button is pressed without a round trip to server.
Lets get into example:
- Create Simple LOVs on Employees table's field 'DepartmentId' and 'ManagerId'
- Create metaContainer facet in af:document (Recommended area to put javascript code)
- In structure window right af:document and choose insert inside > JSF Core > facet
- Choose metaContainer from list and press OK
- Drag af:resource component to metaContainer facet from Component palette and choose type 'javascript'
- Go to page source and create a function showMyLOV as shown in the slide
Note: You can ignore any errors in the structure window regarding "Expected name instead of &."
- Add a client listener to the field you want to display Lov on F9
- Run the page and test
Download the example
More Reading on JavaScript implementation in Oracle ADF check Webuser Interface guide
Happy JDeveloping,
Baig
Sunday, March 21, 2010
How to Create ADF LOV with Filter or View Criteria
Hi all,
This week i will continue my last post about Creating LOV in ADF application and today i will create LOV on ManagerId Column which is different cause of 2 reasons
We would add following 2 business rules to the LOV
1) Manager cannot manage themselves i.e ( EmployeeId <> CurrentEmployeeId)
AND
2) Employee can be manage by other employees in the same department or in Executive Department which ID is 90.
(DepartmentId = 90 OR (DepartmentId = CurrentDepartmentId)
For this we have to create a View Criteria on our ViewObject (VO) that will filter the list based on few Bind Variables.
Steps:
Creating View Object (VO):
- Create new VO in adf.demo.model.queries package called EmpManagerLOV based on Employee entity with updateable is deselected.
- On Attribute page choose DepartmentId, EmployeeId, FirstName and LastName on Query page choose Order by as FirstName and LastName.
Adding Bind Variables to VO:
- Double click the VO EmpManagerLOV go to Query tab page in the Bind Variables section click the green + sign and Create 2 bind variables.
- Name CurrentEmployeeId Type Number Required No
- Name CurrentDepartmentId Type Number Required No
This week i will continue my last post about Creating LOV in ADF application and today i will create LOV on ManagerId Column which is different cause of 2 reasons
We would add following 2 business rules to the LOV
1) Manager cannot manage themselves i.e ( EmployeeId <> CurrentEmployeeId)
AND
2) Employee can be manage by other employees in the same department or in Executive Department which ID is 90.
(DepartmentId = 90 OR (DepartmentId = CurrentDepartmentId)
For this we have to create a View Criteria on our ViewObject (VO) that will filter the list based on few Bind Variables.
Steps:
Creating View Object (VO):
- Create new VO in adf.demo.model.queries package called EmpManagerLOV based on Employee entity with updateable is deselected.
- On Attribute page choose DepartmentId, EmployeeId, FirstName and LastName on Query page choose Order by as FirstName and LastName.
Adding Bind Variables to VO:
- Double click the VO EmpManagerLOV go to Query tab page in the Bind Variables section click the green + sign and Create 2 bind variables.
- Name CurrentEmployeeId Type Number Required No
- Name CurrentDepartmentId Type Number Required No
Sunday, March 14, 2010
Creating LOV in ADF Application
Hi,
This week i will continue to enhance my previous post (Moving to Jdeveloper11g Your First ADF Form) and today i will cover how to create LOVs in Oracle ADF application.
Pre-requisites:
- HR Schema in Oracle database.
- Download this basic completed application and change the connection settings according to your environment.
Objective:
On this post we will create LOVs for Job, Department Id in Simple Employee based form.
Note: (Manager LOV is little tricky i will cover in next post)
Steps to follow:
For good naming convention we will rename the adf.demo.model.view package to queries
- Right click on adf.demo.model.view in Model project and choose Re-factor > Rename and rename it to adf.demo.mode.queries
Adding Departments and Jobs Entities:
Note: If you already have entities in your project then you can skip to next step
- Add Departments Entity by Right clicking on adf.demo.model.entities package in Model project and choose New Entity Object
Enter Name as "Departments" and Choose Schema object as "Departments" by pressing Browse button you can select from the list of objects as well.
- Choose All columns in attributes page and click Finish.
- Repeat the same step for Jobs entity.
This week i will continue to enhance my previous post (Moving to Jdeveloper11g Your First ADF Form) and today i will cover how to create LOVs in Oracle ADF application.
Pre-requisites:
- HR Schema in Oracle database.
- Download this basic completed application and change the connection settings according to your environment.
Objective:
On this post we will create LOVs for Job, Department Id in Simple Employee based form.
Note: (Manager LOV is little tricky i will cover in next post)
Steps to follow:
For good naming convention we will rename the adf.demo.model.view package to queries
- Right click on adf.demo.model.view in Model project and choose Re-factor > Rename and rename it to adf.demo.mode.queries
Adding Departments and Jobs Entities:
Note: If you already have entities in your project then you can skip to next step
- Add Departments Entity by Right clicking on adf.demo.model.entities package in Model project and choose New Entity Object
Enter Name as "Departments" and Choose Schema object as "Departments" by pressing Browse button you can select from the list of objects as well.
- Choose All columns in attributes page and click Finish.
- Repeat the same step for Jobs entity.
Subscribe to:
Posts (Atom)