Monday, October 27, 2008

Oracle Day'08 in Vilnius

During this week, on October 30th, Thursday, there will be Oracle Day'08 event in Vilnius. Its a traditional Oracle event in my country, mostly for a local Oracle market. Information about how to register and attend, you can find on the official Web page.

Event schedule is mostly in Lithuanian language, however by number of speakers and sessions you can see how strong Oracle technology is in Lithuania.

Myself, I will deliver 1 hour session Oracle Maps in JDeveloper 11g - Perfect Combination. This session will be based on material I have presented during Oracle Develop at Oracle OpenWorld'08 in San Francisco.

See you there !

Saturday, October 25, 2008

After BGOUG Autumn' 2008 Conference

Going back home after my session on BGOUG'08 in Bulgaria, Bansko. As usual, delays in airport.

In Bulgaria, I have explained how developers can use ADF Search component and refresh results table together with graph component at the same time. Additionally, I have described how to use ADF Security with wizards and authorize user based on his role.

Here is a sample screen of application I have developed on the fly:

Tomorrow going to Riga for JDeveloper/ADF 11g Masterclass workshop, really busy time... :-)

Wednesday, October 22, 2008

ADF Security 11g and ADF Business Components

Looks like in JDeveloper 11g, ADF Security works as it should work. In this post I will cover ADF Security part, related only to ADF Business Components. For example, Oracle Business Component Browser can be used now to test security configuration in Model layer. It wasn't working in 10g and in 11g Technology Preview builds, however in Production it works!

Now, if you will run secured Application Module with Oracle Business Component Browser, you will get authentication dialog:

This dialog was raised in previous JDeveloper builds as well, however authentication never was passed, it works now.

You can download my sample application - This sample is configured with ADF Security and contains 3 users (all with welcome1 password):
  • john (role: clerk)
  • susan (role: manager)
  • steve (role: developer)
Sample application contains one Entity object - Jobs. This entity is secured for update action:

Two roles are authorized to update on entity level - manager and clerk:

Additionally, JobTitle attribute is secured for update action:

This action is authorized only to manager role:

If you will run Application Module with susan (role: manager) user:

All entity attributes will be available for udate:

With john (role: clerk) user:

All attributes except JobTitle can be updated. It happens, because only manager role is authorized to update JobTitle attribute:

If Application Module will be tested with steve (role: developer) user:

User will not be able to update any attribute, since this user is not authorized for update action:

Vgo Webinar - Client/Server Forms Modernizations to ADF 11g

My colleague - Rob Nocera, will deliver a Web session about Client/Server Forms modernization to ADF 11g on Wednesday, November 12, 2008, 11:00 AM ET. You can register and check event agenda on this page.

This event will be interesting for all Oracle Forms customers, who are investigating their current software infrastructure modernization ways. Rob will talk not only about ADF 11g technical aspects, he also will describe what parts of Oracle Forms functionality can be mapped to ADF and what parts can't.

Monday, October 20, 2008

JDeveloper/ADF 11g Masterclass in Latvia

If you are Oracle Developer, and live in Latvia, you can register to attend Oracle Forms: The Road to SOA workshop in Riga city on October 28th.

Workshop will be based on two parts, during the first part - Grant Ronald (Group Product Manager in Oracle) will deliver one session about Oracle Forms strategy and second about JDeveloper/ADF. On the second part of this workshop, you will dive into detail technical information, it will be JDeveloper/ADF 11g Masterclass delivered by me. Masterclass will be done in similar way, as it was done in Vilnius - JDeveloper 11g Masterclass in Vilnius - After Event. However, described techniques and material will be different and updated. I will show how developers can work with:
  • ADF Business Components new features in 11g
  • ADF Templates
  • ADF Task Flows
  • Regions and Page Fragments
  • ADF Faces Rich Client
  • ADF Data Visualization Components (including Oracle Geographic Maps)
  • ADF Security
I will be happy to share and discuss my experience in Oracle Forms modernization I'm doing with JDeveloper/ADF 11g and Oracle Fusion Middleware.

See you there !

Thursday, October 16, 2008

Form Opening in Find Mode

It can be that topic for current blog post looks very basic, however I will describe one simple thing that can make your development life easier. I will explain how to use Method Call in ADF Task Flow in order to open called form in Find mode, without using invokeAction in Page Definition.

How often you develop forms, where one of key requirements is to open form in Find mode. From my experience, it is quite common behavior. However, usually it is not enough just to define invokeAction in Page Definition and execute Find action each time when page is opened (postback == false). For example, form can be opened in Find mode from main menu, but it should be opened in Edit mode, when is called from separate specific form. In such case, JDeveloper/ADF 10.1.3 developer will create parameters and evaluate through expression language in invokeAction. This approach works, however as always there is a better approach.

This better approach is to use ADF Task Flow functionality available in JDeveloper/ADF 11g. In ADF Task Flow its possible to define Method Calls and separate action logic with page logic. Please, read ADF Developer Guide 11g, in order to get more information about ADF Task Flows.

You can download sample application I have developed - This application is based on standard HR schema from Oracle and implements two pages - index.jspx and main.jspx. First page is defined in unbounded ADF Task Flow and calls second page from bounded ADF Task Flow. Second page is opening in Find mode automatically, without invokeAction in Page Definition.

Main logic, related to this post, is in bounded ADF Task Flow task-flow-definition.xml file:

You can see that as default activity is selected Find Method Call. Idea is - when bounded ADF Task Flow will be opened, default Find activity will trigger and will set iterator to Find mode. Sounds simple, however in practice is little bit more complex. If you will just drag and drop Find action from Data Control and define it as a default activity, it will not work - separate Page Definition file for Method Call will be generated, and Find action will be invoked not for iterator available in main.jpx Page Definition file, but for iterator available in Page Definition associated with Method Call - means Form will not be opened in Find mode.

Second idea that can come to your mind is simply to associate Method Call activity with Find action available in main.jspx Page Definition file:

But, this also will not work, exception on runtime - Page Definition not found:

And now, its time to describe a solution. You need to open DataBindings.cpx file and to assign same Page Definition file to Method Call created in ADF Task Flow as is assigned to a page. In our case, there will be two Page Mappings (one is real, second is for Method Call) and one Page Definition Usage:

When assignment will be done, go back to bounded ADF Task Flow and provide Find action for Method Call from Page Definition file associated with a main.jspx page:

Now it looks everything is done and we can run application, in index.jspx page lets press Find button and open bounded ADF Task Flow with default Find action:

Form is opened in Find mode without any invokeAction declaration:

Just to summarize, ADF Task Flow functionality - Method Call, in this case allows to put form to Find mode automatically when bounded ADF Task Flow is opened. All the other pages inside bounded ADF Task Flow can open the same form without invoking Method Call, what gives higher flexibility.

Thursday, October 9, 2008

JDeveloper 11g Production on Mac OS

Everyone who is interested in Oracle Fusion Middleware probably knows, JDeveloper 11g is production now. And its possible to install it on Mac OS as well. On Windows, installation process is more straightforward, however it is relatively easy on Mac OS also - just you will need to follow a couple of configuration steps. In this post I will give instructions, I was following in order to install JDeveloper 11g on my MacBook Pro, I will concentrate on those instructions not mentioned in installation guide.

Installation process steps:

1) Download jdevstudio11110install.jar from OTN download page. It is a base install, without JDK 6.

2) Go to Oracle Fusion Middleware Installation Guide for Oracle JDeveloper on OTN and follow listed instructions.

3) After you will install Sun Java SE 6 for Mac OS X 10.5, you will need to make Java 1.6.0 default version of Java on your machine. You must run Java Preferences utility at /Applications/Utilities/Java/ to make Java 1.6.0 the default version on your OS. But, this will not change Java version across all system, so in terminal window I executed following commands as a root user to make Java 1.6.0 default VM:

$ cd /System/Library/Frameworks/JavaVM.framework/Versions/
$ ls -l CurrentJDK
lrwxr-xr-x 1 root wheel 5 Oct 3 21:33 CurrentJDK -> 1.5.0
$ sudo rm CurrentJDK
$ sudo ln -s 1.6.0 CurrentJDK
lrwxr-xr-x 1 root wheel 5 Oct 3 21:40 CurrentJDK -> 1.6.0

Now if you will execute java - version in terminal window, you should get something similar:

java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13-120)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_05-b13-52, mixed mode)

4) However, if you will run JDeveloper 11g installer at this step, you still will not be able to install successfully. In my case, installer wasn't able to find Java Home, even if I was providing it directly. I have solved this, when I have found a section about Known Issues for installing JDeveloper 11g on Mac OS in Release Notes document.

When all listed steps were done, installation wizard found Java 1.6.0 automatically and installation finished successfully:

JDeveloper 11g is up and running on Macintosh:

Sunday, October 5, 2008

Multiple LOV's per Attribute in JDeveloper 11g

During OOW 2008 I have attended Steve Muench talk about new features in ADF Business Components available in 11g release - Oracle ADF: New Declarative Validation, LOV, Search, and Services Features. Those features will be available in Production release, announced to appear this month. However, Oracle ACE Directors already have access to production release candidate - JDeveloper 11g Release Candidate for ACE Directors, so I'm able to test those new features.

Very imporant new feature for me - possibility to define multiple LOV's per one attribute. Previously it was possible to have only one LOV defined in Model layer per attribute. In this post I will describe how it works, based on mentioned Steve Muench presentation, and will publish sample application I have developed - You will not be able to run this sample in TP4, only in production when it will be available (I hope very soon).

My sample is based on HR schema, it contains one main View object - EmployeesView and two read-only View objects for LOV's - DepartmentsView and DepartmentsEuropeView. Those two LOV's are based on different SQL statements:

With multiple LOV's per attribute feature, we can use now two or more View objects with different SQL statements for the same attribute. For example, basic SQL statment in DepartmentsView, returns all departments:

And SQL statment in DepartmentsEuropeView, returns departments only from Europe:

Here is a sample screen, where you can see multiple LOV's per attribute defined:

I have defined in this sample, two LOV's for DepartmentId attribute - LOV_Department and LOV_Department_Europe. There is List of Values Switcher attribute defined - lovAttr. This attribute returns LOV name to be used, I have created it as Transient attribute in Employees View object. In its getter method I'm doing a check - if current region is Europe I'm using LOV only with European departments, otherwise default LOV with all departments is used:

On runtime, if employee is based in European department - DepartmentId LOV will use DepartmentsEuropeView and will list only departments from Europe:

In other case, default LOV will be used with all available departments listed:

Thursday, October 2, 2008

JDeveloper 11g Release Candidate for ACE Directors

During Oracle ACE Directors briefing in San Francisco on previous week, Duncan Mills gave JDeveloper 11g Release Candidate for ACE's to test. This build is very close to production they will deliver soon.

What I can say? I really like it, I can't stop testing it during recent days. And, I'm quite surprised in positive way - many bugs from previous builds are fixed, that's good news for us. Main new thing is BEA WebLogic server, its main server now and at least in ACE's build there is no embedded OC4J anymore. Actually, up to some degree I miss good old OC4J. But at the same time, it looks with WebLogic server, application deployment and execution became more stable. WebLogic brings some positive changes in the security area as well, you will see it soon.

One more thing, there will be installer now for JDeveloper. Its related to BEA WebLogic configuration. However, no worries for this, installation process is really quick - up to 5 minutes on my MacBook Pro machine.

Hope you will be able to enjoy JDeveloper 11g production soon.