Pages

29 March 2011

ADF Essential series recorded presentations and tests at ADF Insider

ADF Insider recorded presentation series got one more excellent addition from Grant Ronald, the Oracle ADF Insider Essentials. Moreover, test your knowledge with ADF Insider Essentials Tasks.
Posting some content to tease you:

Oracle ADF Insider Essentials

ADF Business Components

Programatically iterating through rows of a view object March 2011
A common use case is to be able to programmatically access the rows in a view object. This ADF Insider Essentials shows you how.
Building a dependent list of values March 2011
Find out how you can use the declarative features of ADF Business Components to build a dependent list of values that automatically limit its choices based on another attribute value.
Implementing Sequences in an ADF Applications March 2011
Most, if not all, ADF applications based on database tables will have to manage assigning sequence numbers to unique and primary key attribute values. Find out how you can do this in ADF Business Components.
Extending ADF Framework Security with Resource Permissions March 2011
This sample shows how to use the OPSS Resource Permission in ADF Security to protect an entity attribute from update when an entity row is newly created.

ADF Model

Accessing ADF Binding Layer from Java March 2011
When writing code in a managed bean you might want to access attribute values or execute method calls. This ADF Insider Essentials shows you how you can access ADF bindings from a managed bean.
Synchronizing a Tree Control with Detail Data March 2011
This ADF Insider Essentials shows you how selecting a node in a UI tree component can automatically synchronise that data with a form. The key is to use EL to indicate which iterator should be refreshed.

ADF Controller

Passing Data Within A Task Flow March 2011
In a task flow you may want to reference data or values set up in another activity of the task flow. This ADF Insider Essentials shows you how you can pass data in a task flow.

ADF Faces

Building UI Layout using the ADF Faces Switcher Component March 2011
Sometimes you might want to dynamically switch an area of your page to show a different UI component. This demonstration shows how you can use af:switcher to dynamically change the UI layout.
Storing Different Values to those Displayed Using a selectOneRadio March 2011
For a binary value, such as OrderFilled (Y or N) you may have the use case of storing a Y and N in the dtabase but display different values (e.g. Yes and No, or Filled & Not Filled) to the user. This demonstration shows how you can achieve this with a selectOneRadio component.
Controlling Using Input in Table Column Filters March 2011
This sample shows how to customize the column filter in an af:table component to control user query data input. The sample uses JavaScript to enforce numeric value input on an ID attribute field.
Using af:iterator to Dynamically Render an Image March 2011
How can you dynamically render a UI component a set number of times? For example, for a customer rating (which is a numeric value) you want to "stamp out" a certain number of stars to indicate the rating rather than just display a number (like an Amazon rating). This demonstration shows you how using the af:iterator component.

Oracle ADF Insider Essentials Tasks

ADF Business Components

Programmatically iterating through rows of a view object March 2011
Task: How would you programmatically iterate through the rows of a view object to perform an action on each row. For example, for a selected department, you want to give a fixed pay rise to every employee in that department so you want to programmatically access each employee row and and update their salary.
Hint: This functionality needs to be applied to a single Departments Row but across many Employee Rows. The ViewRowImpl class represents a row in a view object and a RowSet represent the collection of these queried employee rows.
Solution: Click here to watch Grant Ronald walk you through a solution.
Building a dependent list of values March 2011
Task: You would like to limit the choices in a drop down list depending on some other data. For example, a department's location is based on a country and a city. You want to ensure that the drop down list of cities only shows cities in the currently selected country.
Hint: The HR schema defines a Departments table, cities are defined in the Locations table and countries are defined in the Countries table. You will need to ensure your view object contains the required attributes. You can use a model driven list of values to define the drop down list for DepartmentsVO.LocationId. A view criteria is a good way of filtering a view object (on which a model driven list of values is based) and it can be parameterised so you can pass the value of country which will filter the model driven list of values.
Solution: Click here to watch Grant Ronald walk you through a solution.
Implementing Sequences in an ADF Application March 2011
Task: When creating a new record (such as an employee or department) you are required to assign a unique value to the primary key attribute. So, in the Departments table this would be Deptno and in the Employees table this would be Empno. These values should be assigned from a database sequence.
Hint: There are two possible ways to achieve this. The first is when a new Department row is created in the entity object, you can read a database sequence (SequenceImpl) and assign a value. The other option (for Employees.Empno) is to assign the sequence in a database trigger and then allow the framework to automatically refresh the attribute with the assigned value
Solution: Click here to watch Grant Ronald walk you through a solution.
Extending ADF Framework Security with Resource Permissions March 2011
Task: Using ADF Security, you would like to set permissions that some users can only edit data when the row is being inserted. Once inserted, users with this permission cannot update the row.
Hint: You will need to create a new resource type (e.g. insert) and extend the EntityImpl to handle this new case by checking ResourcePermission
Solution: Click here to watch Frank Nimphius walk you through a solution.

ADF Model

Accessing ADF Binding Layer from Java March 2011
Task: You have a form for inputing a new employee and a table showing all employees. On pressing a button you want to do the following: commit the new employee record, filter the table of employees to show employees who are in the department of the employee you just added, and you want to refresh the table to show only those employees.
Hint: Your code should be in a single method in a backing bean. You need to access an action binding for the commit and an action binding to call ExecuteWithParams to execute a where clause or view criteria to filter the data. Remember, you will need to pass in the departmentID of the newly created employee. Finally you need to fresh the table UI component.
Solution: Click here to watch Frank Nimphius walk you through a solution.
Synchronizing a Tree Control with Detail Data March 2011
Task: You have a tree control showing Customers by Country. You also have a tree control showing Customers by Sales Rep. In either of these tree controls, if you select a customer, you should see the details for that customer in a form.
Hint: This is not a master detail data model; CountriesVO, CustomersVO and SalesRepVO should be top-level data collections in your application module. Accessors between the view objects allow the tree control to build the appropriate hierarchy. When you build the tree control you should be able to define that the CustomersVO instance should be refreshed when the node in the tree is selected.
Solution: Click here to watch Grant Ronald walk you through a solution.

ADF Controller

Passing Data Within A Task Flow March 2011
Task: You have a task flow consisting of a search page, a method call to perform the search, and a results page to show the result of the search. So for example, you enter a credit limit value in the search page, this value is read by the method activity to filter all customers with a credit limit greater that this value. You then display the result in the final page which also includes the label/prompt "Customers with Credit Limit greater than" .
Hint: You could use a memory scoped variable to hold the value to be accessed by the various activities in the taskflow. So for example, on pressing a button you could set the value of the memory scoped variable (SetPropertyListener), and you would refer to this variable in the method call and in the label/prompt.
Solution: Click here to watch Grant Ronald walk you through a solution.

ADF Faces

Dynamic UI Layout using the ADF Faces Switcher Component March 2011
Task: Build a page containing a panel inside which you want to display two different styles of UI components that you can switch between by selecting a menu option or pressing a button.
Hint: You can use af:switcher to switch between different UI components.
Solution: Click here to watch Grant Ronald walk you through a solution.
Storing Different Values to those Displayed Using a selectOneRadio March 2011
Task: In your database, for example Orders.OrderFilled, you are storing a single character value Y or N. However, when exposing that attribute to the user as a radio button you would like to display "Yes" and "No" as the data values while still storing Y and N in the data model
Hint: Using ADF Business Components model driven list of values and a read only view object to store the display and data values, you should be able to then easily drag and drop the attribute onto the page as a selectOneRadio
Solution: Click here to watch Grant Ronald walk you through the solution.
Controlling Using Input in Table Column Filters March 2011
Task: For an employees table, you would like to prevent the user from inputing alpha characters for the EmployeeId table column filter.
Hint: You can use the filter facet in a table column to define a component you want to use for filtering that column. You could then use a JavaScript function to be called everytime the key is pressed in that field and check that the value is not an alpha character.
Solution: Click here to watch Frank Nimphius walk you through a solution.
Using af:iterator to Dynamically Render and Image March 2011
Task: Depending on the value in a field, you would like to "stamp" out an image that number of times. For example, if a customer has a rating 1-5 then you would like to display a star that number of times. So a customer with a rating of 3 would displa 3 stars to indicate their rating.
Hint: An af:iterator component can take an array list as its value. The number of elements in that array will define how many times the iterator will stamp out. For a more advanced example, the array could also define which image should be stamped out.
Solution: Click here to watch Grant Ronald walk you through a solution.

 Dig more:






1 comment:

  1. Hi
    I have one problem.I just want to know that how three dependent drop down list work and how to bind in ADF ... only three dependent drop down..plz if anybody have some knowledge for that plz suggest me and you can write me a mail for that my email id is
    manoj.praja.1982@gmail.com

    ReplyDelete