ADF chapter 3 summary
Getting Started
The important notes are:
Row row = ordersVO.getCurrentRow();
Date shippedDate = (Date)row.getAttribute("OrderShippedDate");
OrdersRow row = (OrdersRow)ordersVO.getCurrentRow();
Date shippedDate = row.getOrderShippedDate();
2. interfaces accessible for the client:
1- Application Module
2- View objects, representing the query components
3-View rows, representing each row in a given query component's results
3-Custom Client Interfaces for Components
you can create your own custom interface that contains your custom business services required to be exposed to some clients.
so, you can create your java class that extends the super interface . for example
4- Overview of Groovy Support
Groovy is:
There is one top-level object named adf that allows you access to objects that the
framework makes available to the Groovy script
The important notes are:
- Generic VS strong typed API:
- generic is to use only one method that accepts column name as string
- strongly typed is to use getter method for the attribute or column name
Row row = ordersVO.getCurrentRow();
Date shippedDate = (Date)row.getAttribute("OrderShippedDate");
OrdersRow row = (OrdersRow)ordersVO.getCurrentRow();
Date shippedDate = row.getOrderShippedDate();
2. interfaces accessible for the client:
1- Application Module
2- View objects, representing the query components
3-View rows, representing each row in a given query component's results
3-Custom Client Interfaces for Components
you can create your own custom interface that contains your custom business services required to be exposed to some clients.
so, you can create your java class that extends the super interface . for example
- StoreServiceAM extends ApplicationModule : Custom application module interface
- OrderItemsInfo extends ViewObject : Custom view object interface
- OrderItemsInfoRowClient extends Row : Custom view row interface
4- Overview of Groovy Support
Groovy is:
- scripting language
- Java-like syntax
- executed at runtime
- strongly typed language
- Define an Script Expression validator or Compare validator
- Define error message tokens for handling validation failure
- Handle conditional execution of validators
- Set the default value of a bind variable in the view object query statement criteria statement
- Define the default value for an entity object attribute
- Calculate the value of a transient attribute of an entity object or view object
There is one top-level object named adf that allows you access to objects that the
framework makes available to the Groovy script
- adf.context - to reference the ADFContext object
- adf.object - to reference the object on which the expression is being applied
- all attributes in Entity objects
- all attributes in View Objects
- Bind variable in view objects:
- Bind variable in view accessors:
- Transient attributes:
- adf.error - in validation rules, to access the error handler
- adf.userSession - returns a reference to the ADF Business Components user session
- adf.currentDate
- adf.currentDateTime
- newValue: in an attribute-level validator, to access the attribute value being set
- oldValue: in an attribute-level validator, to access the current value
Comments