July 29, 2008

JDeveloper 10.1.3.4 is out

JDeveloper 10.1.3.4 (Build 4270) is now in production and can be downloaded from OTN.

It is a maintenance release including only bug fixes.
There are no new features.

You can find the list of bugs fixed in this release [Here].

June 20, 2008

Automatic Updates in Windows XP


I really hate these Automatic Updates in Windows.
I'm not against the Automatic Updates themselves, but the dialog that follows, and that only gives you 2 options:
Restart Now and Restart Later:
AutomaticUpdateDialog:

Why to complain? It gives you the opportunity to dismiss the dialog by clicking the "Restart Later" button.
That's true, but for 5 minutes only. After this grace period, the dialog is back, thumbing its nose at you....
And after a few "Restart Later", you finally give up and restart the machine.


So far, I was stopping the "Automatic Update" service when the dialog was popping up.
However, a support engineer from our Java tech. team came up with a better solution he found on a blog:
you can disable the auto-restart for the Automatic Updates installations.
See more information on this blog: "XP Automatic Update Nagging"

June 18, 2008

Firefox 3


In case you haven't heard about it yet....

... Firefox 3 is available for download, with the intention to set the record for the most software downloaded in 24 hours.

The initial announcement was

Download Day is here!
Set a Guinness World Record
Enjoy a Better Web

Sounds like a good deal, right? All you have to do to help us set the record for the most software downloaded in 24 hours is get Firefox 3 now
it's that easy. We are not asking you to swallow a sword or to balance 30 spoons on your face, although that would be kind of awesome.

Please download Firefox 3 by 17:00 UTC on June 18, 2008. That's 10:00 a.m. in Mountain View, 1:00 p.m. in Toronto, 2:00 p.m. in Rio de Janeiro, 7:00 p.m. in Paris, Madrid, Berlin, Rome and Warsaw, 9:00 p.m. in Moscow, and June 19, 2008 at 1:00 a.m. in Beijing and 2:00 a.m. in Tokyo.

but now, I see the deadline slipped a bit by 1 hour and 16 minutes:

Firefox3Download:


Waouw - days of 25 hours and 16 minutes - I want these :-)

June 17, 2008

How To Delete An Entire Workspace Or Project?


A customer asked me how to delete an entire Workspace from JDeveloper 10.1.3.
He had selected his workspace and then selected the menu "File" -> "Erase From Disk"
The corresponding JWS file was removed, but not its content (Projects).

That's indeed the way the "Erase From Disk" works:
it only deletes the selected object from the OS;

in case of a Workspace or a Project, you delete the corresponding JWS file or JPR file only.
JDeveloper doesn't delete their content recursively.


...

If you delete an application or a project, only the .jws or .jpr file is actually deleted. The

elements contained within the application or project remain on disk. To delete them from disk

through JDeveloper, you must do so explicitly.

So, you have to delete the content of the Workspace or Project manually after you selected "Erase From Disk" in JDeveloper.

June 9, 2008

Buttons Generated As Standard Html Buttons In ADF Faces On Linux


Problem

This question comes regularly in the OTN forums.

You have developed your application on a Windows system and defined your own skin (css), including some customizations for the buttons f.ex.:
.AFButtonServerText:alias
{
    color:black;
    background-color: #D2DEED;
    font-weight:bold;
    font-family: Arial, Helvetica;
    font-size: 11px;
}

.AFButtonServerTextDisabled:alias
{
    color:#AAAAAA;
    font-family:Arial, Helvetica;
    font-size: 11px;
    font-weight: normal;
}

When you run the application in the Embedded OC4J on Windows, the page renders correctly, with the buttons generated as "image buttons":
ADFButton:

However, the same application deployed on iAS on your Linux machine shows the buttons as standard HTML buttons:
StandardButton: .

You use the following Java Option in iAS on Linux:
   -Djava.awt.headless=true
as recommended in the JDeveloper online help, "About ADF Faces Supported Platforms".

So, what's the problem ?

Cause

The font "Arial" is not available on your Operating System.

The ADF Faces buttons are normally generated as GIF files by the Java's AWT graphics library.
When the Java API doesn't have access to the specified font, it generates the button as a standard HTML button.

Solution

Either install the missing font on your Linux system (the Java API will use it to generate the image buttons) or use another font.

The best choice to avoid the problem when deploying the application on different platform is to specify a logical font (Dialog, SansSerif, ...), that's mapped to an existing physical font on your OS.
You can find the list of the mapping in <iAS_Home>\jdk\jre\lib\font.properties
NB: this name may differ depending on the OS

F.ex. the "SansSerif" logical font is mapped to the "Lucida Sans" physical font:
sansserif.plain.latin-1=-b&h-lucidasans-medium-r-normal-sans-*-%d-*-*-p-*-iso8859-1
and the Lucida font is always installed as part of the JDK (in ...\jre\lib\fonts).
So you are sure with this solution that the buttons will always be generated as image buttons, whatever the OS you are deploying to.


NB: though it was written for UIX, most of the information contained in the chapter "18. Image Generation in ADF UIX" of the "Oracle ADF UIX Developer's Guide" is still valid for ADF Faces.

June 4, 2008

Internet Explorer 7 Support

As you can read in the "Oracle JDeveloper 10.1.3.3.0 Installation Guide", the browsers that are supported in the current release of JDeveloper are:

  • IE 5.5
  • IE 6.0 (XP only)
  • Netscape 7.2
  • Mozilla 1.7
  • Firefox 1.0.4
  • Firefox 1.5
  • Firefox 2.0
  • Safari 2.0
We are regularly contacted at Oracle Support about the support of Internet Explorer 7.
IE 7 is not supported with JDeveloper 10.1.3.3.0

Development was not sure to be able to certify IE 7 before the release of JDeveloper 10.1.3.5
However, I have got the good news from the development team that they could finally complete the certification for IE7 in JDeveloper 10.1.3.4

May 19, 2008

Configuration Property: "MetaObjectManager" Scope


I have been working on a tricky case where the customer had developed a custom DBTransactionFactory, following instructions from the article "Creating and Using a Custom DBTransaction Implementation" from Steve Muench.

It was working fine and the application was correctly using the custom DBTransactionFactory.
However, after customer deployed another application in the same Web Container and also using its own custom DBTransactionFactory, he  noticed that the second application was using the same DBTransactionFactory (same class and same instance) as the first application.

After investigation, development pointed out that TransactionFactory has a MetaObjectManager scope, as shown when executing the following command:


java -cp <JDev_Home>BC4Jlibbc4jmt.jar oracle.jbo.common.PropertyManager

---------------------------------------------------------------
Business Components for Java - System Properties
---------------------------------------------------------------
Properties loaded from following sources, in order:
1. Client environment
2. Applet tags
3. -D flags (appear in System.properties)
4. bc4j.properties file (in current directory)
5. /oracle/jbo/BC4J.properties resource
6. /oracle/jbo/commom.jboserver.properties resource
7. /oracle/jbo/common.Diagnostic.properties resource
8. System defined default
---------------------------------------------------------------
...
TransactionFactory MetaObjectManager (M)public Internal
...
---------------------------------------------------------------

As explained in the JDeveloper online help, topic "Understanding Configuration Property Scopes":

...
You'll see each property is listed with one of the following scopes:

* MetaObjectManager
   Properties at this scope are initialized once per Java VM when the ADF PropertyManager is first initialized.
...
If
you leave any MetaObjectManager-scoped properties in your bc4j.xcfg
files, you will have the undesirable behavior that they will take on
the value specified in the configuration of the first application
module whose pool gets created after the Java VM starts up.
...



We could force each application using its own version of TransactionFactory by adding code to the latter part of each ApplicationModuleImpl.

In Application 1, that should use CustomDatabaseTransactionFactory1, f.ex.:

...

static

{
   oracle.jbo.server.DatabaseTransactionFactory.setFactory(new CustomDatabaseTransactionFactory1());

}
In Application 2, that should use CustomDatabaseTransactionFactory2, f.ex.:

...

static

{
   oracle.jbo.server.DatabaseTransactionFactory.setFactory(new CustomDatabaseTransactionFactory2());

}

May 2, 2008

Oracle JDeveloper 11g Technology Preview 4 Available


You can download it from OTN.
See also the "Oracle
JDeveloper 11g Technology Preview 4 New Features
"


If you have any question and/or problem, please post them on the dedicated JDeveloper 11 forum.

Enjoy it!

April 30, 2008

Only Rendered ADF Faces Components Can React To PPR


This question comes regularly at Oracle Support and in the forums.
You want to show (render) and hide an ADF Faces component dynamically on your page, depending on the value of another component.

Suppose f.ex. a Radio Group with 2 buttons "Show" and "Hide'.
Clicking "Show" should display a button; it should disappear when clicking "Hide".
For that, you defined a selectOneRadio that saves the values "show" and "hide" in your backing bean, in an attribute "radioBtnValue":

            <af:selectOneRadio label="Show/Hide" id="yourSelectOneRadio"
                               value="#{Backing.radioBtnValue}"
                               autoSubmit="true">
              <af:selectItem label="Show" value="show"/>
              <af:selectItem label="Hide" value="hide"/>
            </af:selectOneRadio>
You then defined your button as the following:
            <af:commandButton text="Button"
                              rendered="#{Backing.radioBtnValue=='show'}"
                              partialTriggers="yourSelectOneRadio"/>
Because of the partialTriggers property, you are expecting the button to be updated when an event occurs on the selectOneRadio.
The rendered property should then be re-evaluated and set to true when the button "Show" was clicked.

Unfortunately, it doesn't work

You cannot use PPR (Partial Page Rendering)
to directly toggle the "rendered" attribute of a component.
You have to wrap
the component (with the rendered attribute) in a parent component and set the
partialTriggers in its parent.
The reason is that only components that
are rendered can react to PPR.

In the example above, you can create a parent with the partialTriggers property, a panelGroup f.ex.:


            <af:panelGroup partialTriggers="yourSelectOneRadio">
                 <af:commandButton text="Button"
                                   rendered="#{Backing.radioBtnValue=='show'}"/>
               </af:panelGroup>

When an event occurs on the selectOneRadio, the parent component will react to PPR.
During the PPR,
the parent component and all its children will be updated.

the rendered property of the button will be evaluated and the button
displayed or hidden accordingly


I added sample 7 to my ADF Sample Applications page.


April 23, 2008

Application Lifecycle Management Tools Survey


Sunsan Duncan
has opened a 8 question online survey
to find out what Application Lifecycle Management (ALM) tools our
customers (or any software developers as it's not restricted to JDeveloper
users) use. 

The aim  is to add better integration with ALM tools in JDeveloper, and product management is interested in knowing what tools are most used today so they can better serve the needs. 

If you have any interests in that area, please have a look and fill in the survey.
You can find Susan's request on her blog.

Thanks in advance !