July 15, 2008

Using selectOneChoice with JPA relationships

On OTN some asked how to create a selectOneChoice item from an object that relates to another object when using JPA and ADF Faces.

Here is the quick how-to.
We'll use the default Employees and Departments table from the HR schema. Just create default JPA entities on them with the JDev wizard and then create a service facade and right click it to create a data control.

First you'll drag the Departments object from the queryDepartmentsFindAll DC onto a JSF page and drop as an ADF Form.
Now you want to show the name of the manager of each department in a drop down list.
To do this expand the Employees object underneath the departments and click the firstName.
bind.jpg

Drag it over to the JSF page and drop as a selectOneChoice component.
You'll be prompted to bind the list. You want to bind it to a list of employees - so you'll create a new List data source based on the queryEmployeesFindAll

You'll map the EmployeeID and you can choose to display the first name.
Like this:

bind.jpg

And that's it. Run the page and it will look like this:

bind.jpg

July 8, 2008

The new WebLogic Developers Conference

Now that BEA and WebLogic are part of Oracle, what is going to happen to the yearly conference BEA held for developers?

Well it got merged into the Oracle Develop conference this year at OOW.

Last month when I posted my previous entry on this year's Oracle Develop conference, I said we have 135 sessions in the conference - turns out we actually have 188 sessions according to the content catalog.

Most of the sessions that got added have to do with WebLogic/BEA products.
A quick search on "WebLogic" brings back over 25 sessions and hands-on labs and seraching for JRockit will bring more.

So if you are a WebLogic developer, we hope you'll join us this year at Oracle Develop and OOW.

July 7, 2008

New Free Fusion Development Workshops

For the past several years we've been running the OTN Developer Days across the US and Canada with great success.
Well the time has come for an update of the material, so Lynn from our team did an update of the content to be based on the upcoming 11g version - and we ran the first pilot event here in HQ last week - and now we are ready to roll it to the rest of the world.

The workshop is built from two half days - the first half consist of presentations and demos that will introduce you to the concepts of development used for Fusion Applications development. In the second half of the day you'll be running through hands-on labs and actually experience building a complete application.

We are covering the ADF stack used by the Fusion Applications inside Oracle (ADF Business Components, ADF Controller and ADF Faces Rich Client Components).

This workshop is a great introduction to the future of application development in the Oracle world.
Beyond our regular Java audience, we expect to see also Apps customers (EBS, PeopleSoft, Siebel etc), Forms customers and of course BEA customers who won't to see a more productive approach to Java based application development.

Check out the current schedule here.

If you don't see an event coming to your town - contact your local Oracle office and ask them to make sure this roadshow comes to your location. (They can call me if they need details on how to get this going).

I'll be doing the event in Pennsylvania on July 22nd - drop by and say hello.

July 1, 2008

What can JDeveloper do with WebLogic?

So now the picture is clearer about what Oracle is going to do with the various products we got from BEA. (If you missed the webcast check the replay here.

JDeveloper is still Oracle's strategic IDE and since we now also have the WebLogic Java EE server, you might be wondering what type of integration do we have in place between the two.
Well as a matter of fact we have been certifying JDeveloper and the ADF framework with WebLogic for a long time.
As a result you can do direct deployment from JDeveloper to a remote WebLogic Server.
You can also deploy the ADF Runtime libraries on such a server and have an ADF application running there.

Just to prove it, I recorded an online demo and wrote a how-to that shows you how to connect JDeveloper to WebLogic and deploy the SRDemo ADF sample application on top of it.

Get the details here.

Entry 200 and a new home

Welcome to my new/old blog.
What's new? Well the main thing you'll be noticing is the new color schema and layout - everything else should function just as before including all the entries and the URLs.
But underneath the blogs.oracle.com server which this blog runs on has moved and is now based on a new blogging platform.

An interesting coincidence is that I had 199 blog entries on the previous server and this new blog server gets my 200 entry - nice round number.

So welcome to my new blog and let me know if you are missing anything from the old blog and I'll try and fix it.

June 19, 2008

How to Get More JDeveloper content into OOW

One new thing about Oracle OpenWorld this year, is that there is a specific allocation set aside for sessions that will be suggested by users online on Oracle mix.
Anyone can suggest a session they want to deliver and anyone can vote for the sessions they would like to see.

It's all done from here.

I browsed the list of sessions out there, and there are several interesting sessions suggestions around JDeveloper and ADF.

For example:
This one
Or This
and some others

If you want to hear any of these you should vote for them.
And if you have any other ideas for sessions you should submit them - it is a great opportunity to share your knowledge.

P.S.

This blogs and all the rest of the blogs on blogs.oracle.com will be out for a couple of weeks while we migrate the server to a new platform. If all goes well I hope to see you back here July 1st with a new look and feel, more features, and new content.

June 6, 2008

Who provides the best IDE value according to Evans Data?

Evans data did a survey among developers about their satisfaction with their IDE - and JDeveloper came out in second place.

Now since we didn't make first place (IBM) did, I wasn't planning on blogging about it (even though we beat Microsoft, NetBeans and others) - but then I came across an interesting spin that the myEclipse marketing people created.

They claim that when you look at the difference in scores compared to the difference in price they provide the best IDE value - after all the IBM tool clock at about $4,200 per license and they charge you $60 per year.

Really ?!

They forgot two simple facts:

JDeveloper is cheaper than MyEclipse (JDeveloper is FREE)

and JDeveloper got second place compared to their last place.


So there you have it - according to the MyEclipse guys' logic - JDeveloper is the Best IDE Value.

June 4, 2008

Oracle Develop and OOW Session Catalog is Out

Wondering what to do on the week of Sep 21?

Well here is a list of options for you - the content catalog for Oracle Open World and Oracle Develop has been published.


This year Oracle Develop, the key event for developers on the Oracle platform, is bigger then ever.

We expended the event to run for three days - Sunday-Tuesday and added more sessions and more hands-on labs. (and brought it closer to the Moscone center - so no more long walks between Oracle Develop and OOW).

This year we'll have 130 technical sessions and 75 hands-on labs.

This is the must event for any JDeveloper/ADF user - with over 25 sessions and labs from the JDeveloper product management team and other JDeveloper related sessions by users and customers - you are bound to learn new things that will help your daily work.

In addition, this is a great opportunity to get some one-on-one time with your favorite Oracle expert or to tap into the experience of other developers working on the same technology as you do.

So go to your favorite travel planning site and start planning your trip to the biggest Oracle event ever.

And don't forget - this year we are starting on Sunday!.

May 16, 2008

Master with Two Details on the Same Page

ADF makes it very easy to create a master detail page with one drag and drop operation from the data control palette onto the page.
But what if you want a master with 2 details on one page?

It's actually quite simple to achieve this - but I got asked this a couple of times last week so here goes...

All you need to do is drag the first detail over and drop it as a master->detail.

md1:

Then drag the second detail over and drop it as a table or a form - and now you have the three tables on the page and you are almost done.


But if you'll run your page now you'll find that your second detail is not refreshing when you are switching between the master records the way that your first detail does.
ADF did this synchronization part automatically for the first master-detail you dropped. All you are missing is a partial page rendering setting on your second detail.
See the difference between the two detail tables here:

md4:

md5:

So let's set it up - all you need to do is go to the form or table that contains your second detail and set its partialTrigger property to point to the master component.
(You can look at the setting for your first detail component and copy them).

May 13, 2008

Refreshing A Part of Your Page After a Pop-up

A question from OTN:
You have a page that shows some data in a table, then you pop-up a dialog window where you change the data. Then you close the window - but how do you refresh the table to show the change?

The trick is to invoke a partial page render event on your table when you return from the pop-up.

So in your first page you have a button that looks something like:


<af:commandButton text="Submit" action="dialog:go"
useWindow="true" windowHeight="500"
windowWidth="500" returnListener="#{backing_show.backFromPopup}"/>


Note the returnListener property - this one points to the following piece of code in a backing bean:


public void backFromPopup(ReturnEvent returnEvent) {
AdfFacesContext.getCurrentInstance().addPartialTarget(table);
}


And the table is the backing bean binding to the object you want to refresh.