Showing posts with label Bindings. Show all posts
Showing posts with label Bindings. Show all posts

Thursday, December 8, 2016

Video - Live Webinar - Master Class - ADF Bindings Explained

Posting 2 hours long video recording for yesterday webinar - Master Class - ADF Bindings Explained. Thanks to everyone for attending. It was large crowd, nearly 100 attendees live. I enjoyed answering to all of your questions, hopefully this will be useful in your daily work.


Webinar topics:

1. ADF Bindings overview. Why ADF Bindings are required and how they are useful
2. Drill down into ADF Bindings. Explanation how binding object is executed from UI fragment down to Page Definition
3. ADF Binding types explanation. Information about different bindings generated, when using JDeveloper wizards. What happens with ADF Bindings, when using LOV, table, ADF Query, Task Flow wizards.
4. Declarative ADF binding access with expressions
5. Programmatic ADF binding access from managed beans
6. ADF binding sharing and access from ADF Task Flows. How to create binding layer for Task Flow method call or router activities.
7. Best practices for ADF Bindings
8. Your questions

Download webinar ADF 12c app from GitHub - ADFAltaApp

Tuesday, November 15, 2016

Live Webinar - Master Class - ADF Bindings Explained

I will be running free online webinar on Wed, Dec 7, 2016 7:00 PM - 9:00 PM CET. Everyone who wants to learn more about ADF Bindings is welcome to join !

Registration URL: https://attendee.gotowebinar.com/register/3325820742563232258
Webinar ID: 806-309-947

Title

Master Class - ADF Bindings Explained (Andrejus Baranovskis, Oracle ACE Director)

Description

This 2 hours long webinar is targeted for ADF beginners with main goal to explain ADF bindings concept and its usage to the full potential. ADF Bindings is one of the most complex parts to learn in ADF, every ADF developer should understand how ADF bindings work. Goal is to have interactive session, participants could ask questions and get answers live. This live event is completely free - join it on December 7th at 7:00 PM CET (Central European Time) (which is respectively 1:00 PM New York and 10:00 AM San Francisco on December 7th).

In order to join live webinar, you need to complete registration form on GoToWebinar. Number of participants is limited, don't wait - register now.

Topics to be covered: 

1. ADF Bindings overview. Why ADF Bindings are required and how they are useful
2. Drill down into ADF Bindings. Explanation how binding object is executed from UI fragment down to Page Definition
3. ADF Binding types explanation. Information about different bindings generated, when using JDeveloper wizards. What happens with ADF Bindings, when using LOV, table, ADF Query, Task Flow wizards.
4. Declarative ADF binding access with expressions
5. Programmatic ADF binding access from managed beans
6. ADF binding sharing and access from ADF Task Flows. How to create binding layer for Task Flow method call or router activities.
7. Best practices for ADF Bindings
8. Your questions

Thursday, October 27, 2016

ADF Regions and Shared Data Control Bindings Use Case

While teaching ADF trainings and talking to ADF developers, often I can see people think about ADF bindings as about some mistery and try to avoid using full potential of ADF Data Control. I would like to give simple, but practical example in this post, which describes how to use ADF bindings and access these bindings across different ADF regions.

This diagram shows how sample application (BindingAccessApp.zip) is implemented:


There are two regions (task flows), both are configured with Shared Data Control (means they will share same AM instance). Employees region could change current row. From Jobs region we can access bindings updated in Employees (Email attribute in this case).

Two regions are rendered side by side. I can move to different row in Employees and press button Set Current. This will set displayed row as current:


Current row in Employees region is set through custom method:


Button in Jobs region - Show Employee displays Email value from Employees region. Such functionality can be important, when you need to implement data exchange functionality between regions. Simply rely on ADF bindings in Shared Data Control - this would work:


Main page contains both regions:


Email field value is set in Employees region, through ADF bindings:


Binding attribute for Email is defined in Page Definition and attached to Data Control:


Make sure TF is set to default Shared transaction, otherwise changes in the ADF bindings values will not be visible outside of current task flow/region:


Email attribute is referenced through the binding in Jobs region:


You must include Email attribute binding into Jobs region page definition. Its value will be automatically set to the one from Employees region:


Hopefully this will explain how powerful ADF bindings are.

Tuesday, October 28, 2014

Handling Date Format and ADF Bindings

There are tips and tricks related to the date format handling and ADF bindings. When Oracle date type attribute is being used through ADF binding expression, it will be converted to String with default format (yyyy-MM-dd), no matter what original format was set. This is described in API for the Oracle date type - Date constructor with String. Below I'm going to explain how it works and how you could optimise ADF application to handle date type attributes from ADF bindings layer.

Sample application (download it here - DateFormatApp.zip) is based on one simple VO with calculated attributes, both oracle.jbo.domain.Date type:


ADF UI implementation is standard - there are ADF Input Date components with regular date converters:


There is a button on UI, it calls custom method implemented in VO and exposed through the bindings. This method accepts two parameters, both oracle.jbo.domain.Date type. I'm using regular binding expression and getting inputValue property (this returns formatted value of the date):


Try to invoke the method, you will get an error about invalid argument - binding expression with date attribute is not accepted. It is trying to use formatted value dd/MM/yyyy and set it for the custom method argument value, but Oracle date accepts only yyyy-MM-dd (I'm using Alta UI skin):


Error message is written in the log:


The workaround is to use attributeValue instead of inputValue in the binding expression. Property attributeValue returns original unformatted date type attribute value:


Do the same test again, type both dates and press Test Dates button - this would work now:


I'm checking out date values in the custom method. Originally it comes unformatted date value, taken from attributeValue property. If we would like to use date value in the certain format (e.g. send to PL/SQL in format dd/MM/yyyy, instead of default yyyy-MM-dd), we should apply DefaultDateFormatter to retrieve the formatted String value for the original date:


Here is the output from the custom method: