Monday, November 30, 2009

Issues after migrating our application from jdeveloper to

1. In windows XP pro, when the integrated weblogic is running we get the following exception about adrci.exe . Yet after that everything seems to be working ok.

2. We call many task Flows by url, in order to open them in new window. After migration they gave 403 error.

There is a new property added in Task Flows definition URL invoke that we needed to set it to url-invoke-allowed in all task flows called like that.

The only documentation I found about that is in

15.6.4 How to Call a Bounded Task Flow Using a URL

…The default value (calculated) allows a URL to invoke the bounded task flow if the bounded task flow does not specify an initializer and it has a view activity as its default activity. If the bounded task flow does not meet these conditions, a HTTP 403 status code is returned…

Yet even though we had no initializer and we had default activity we still got HTTP 403 and had to change to url-invoke-allowed

3. We have many tables that have check box based on a view object Boolean attribute. After migration the attribute value was always set to null no matter checked or unchecked.

The workaround was to remove in view objects from those attributes the control type ‘check box’ as Tilemahos in oracle forums found

Test case

Saturday, November 28, 2009

ActionListener and showPopupBehavior

Many times developers complain that actionListener of a button is not invocked when they add a showPopupBehavior. Yet that is not a bug.

By default showPopupBehavior the action type is Action that is a client event and does not invoke server actions. That is described in af:showPopupBehavior documentation:

The af:showPopupBehavior tag is a declarative way to show a af:popup in response to a client-side event. The client event is specified using the triggerType attribute. The "action" event is the default triggerType if one is not provided.

All actionListener method bindings and associated action listeners will not be invoked when the triggerType of "action" is used.

So the solution is to just set the triggerType of ShowPopupBehavior to click.

Then the actionListener and popup are invoked.

Edit 19/12/12:
As posted in the comments bellow, this is not the best possible workaround. It is more like a quick and dirty solution. With this solution even if the button is disabled the popup is still opened without the Action listener invoked.
A better solution if you need an action listener on buttons that opens a popup is not to use the showPopupBehavior but to open the popup from within the action listener by binding the popup to the managed bean and use method.

Tuesday, November 24, 2009

Setting value programmatically on required field.

It is common requirement when you set a value in one field to also set a value to a second field.

This we usually do on setter of view object of the first field or the valueChangeListener also by adding a partialTrigger on the second field.

Yet if the second field is required and the previous value is null then nor the setter nor the valueChangeListener are invoked because of validation error.

This is because the partialTrigger is trying to refresh the second field before even submitting the first field.

Is this a bug or intended behavior?

The workaround we found is to remove partial trigger from second field and on valueChangeListener of the first field to use addPartialTarget

In the test case when you select department we want to set manager also, so in the setter of department id there is:
public void setDepartmentId(Number value) {
setAttributeInternal(DEPARTMENTID, value);
this.setManagerId(new Number(100));

Also managerId field is set required=true

Test case:

Sunday, November 22, 2009

Carousel does not make the selected row current

Carousel is a realy nice new component in jdeveloper 11 patch1
When you create a data binded carousel item it just uses an iterator and a tree model as a table.
Every item in carusel is from a diferent row of the iterator.
Yet when you select a new item the current row of the iterator is not changed.
So if you want to have other fields of the same iterator in the page or detail view objects iterators the data are not refreshed while navigating in Carousel.
I think a selectionListener as in the table component is missing.

In order to achieve the above behaviour i did the following:
I binded carouselSpinListener property to a backing bean method where
i get the carusel event NewItemKey and i find the Key of the row and i set iterator current row to the carusel selected row.
public void caruselSpin(CarouselSpinEvent event) {
List l =(List)event.getNewItemKey();
Key k = (Key)l.get(0);
DCIteratorBinding iter = getDCBindingContainer .findIteratorBinding ("DepartmentsView1Iterator");


Now Every time you select new item in carusel the iterator has the selected row.

Test case:

Sunday, November 15, 2009

Still reproduced bugs in jdeveloper patch 1

Yet there are still a lot of bugs that can reproduced in jdeveloper

Those bugs are:

Attribute Validation on Input List of Values attribute

Page Fragment Design view is messed up when using resource bundle

Workaround for Page Fragment Design view when using resource bundle

Number precision and scale bug

unexpected error on graph preview when security enabled

Tab selection and Enable User Customization on Session bug.

Unsaved changes uncommittedDataWarning bug

ExecuteEmptyRowSet and Range Paging.

LOV execute query many times ***Improved but not fixed

Range Paging in Master Detail bug.

Table Filter Bug

Af:Query bind variable bug

LOV view object Tuning: 'Only up to row number' bug

Returning from dialog to a page that has f:verbatim tag bug

Range paging and Table Selected Row Bugs
*** even though related metalink bug 8673654 is marked as fixed for this version

Partial Page Rendering ChangeEventPolicy="ppr" bug.

Performance Tuning, LOVs and Range Paging bug
*** now LOV with Range paging opens but when you return value you get exception.

ADF input list of values AutoSubmit bug.

Query Component Required Criterion bug ( r1 Bug)

Query Component Focus bug

Fixed bugs in jdeveloper patch 1

So i tried to reproduce bugs posted in this blog to the new patch 1 of jdeveloper 11.

Many on them are not reproduced any more and i consider them fixed.

Fixed bugs are:

Returning Multiple values from LOV in af:query with bind variables bug

No inconsistency check after any Exception during posting data

Af:Query bind variable bug

Region and dialog return bug

Page with Region Validations bug

LOV criteria bug.

Table Validations Bug.

Jdeveloper 11 r1 An unexpected severe error has ocurred in Jdeveloper

LOVs Dont return Values when there is any validation error on page

JDeveloper 11 r1 Cascading LOV bugs

Query Component Save bug

Query Component validations bug

Friday, November 13, 2009

New Feature Closing a Popup can now be captured.

My first impression of patch 1 of jdeveloper11 is that it looks like a new IDE,
diferent screens for overview and for security,
diferent menus and lots of new properties.

One thing that was missing and I was complaining about in the oracle forums was the capturing of an event when a popup dialog is closed.

Now a new property in popup component popupCanceledListener solves this problem.

You can just assign a backing bean method on it and it works no mater how you close the popup (with Cancel, with 'x' button or with ESC key).

This was realy needed. Thanks oracle team for the new feature

The only little bug in this is that in design view the popup is not visible when you place it in button facet popup

Test Case

Wednesday, November 11, 2009

Patch set 1 of Oracle JDeveloper 11g is now available

Oracle JDeveloper 11g ( (Build 5536) is now available for download at

I will try to reproduce all bugs posted until now in this blog and will log the results shortly.

Tuesday, November 10, 2009

returnListener from dialog page not invoke when pressing x button

In a button that opens an other page as dialog if you define a returnListener method in managed bean then when you return form dialog page by a button that has af:returnActionListener then it works fine.

But if you close the dialog page with explorer x button then return listener is not invoked!

i also noticed a worning in log:

WARNING: The application is running with the new window detect flag off. It is highly recommended that this flag be turned on to ensure proper functioning of your application when new browser windows are launched. In web.xml set the context parameter to 'on'.

But even when i did that there was no difference appart from no worning.

Is this a bug?

How can we ensure that when a dialog closes (no matter how) a method will be executed?

Test case:

Friday, November 6, 2009

Attribute Validation on Input List of Values attribute

If you have an attribute validation in an Entity Attribute that is used in a view object as Input List of values then validation does not work correctly.

For testing i added a simple validation in departmentId of Employees Entity that it should be less than 100:

I set departmentId as Input List of values and autosubmit.
When I run the page and i select an invalid department then the value is not set to the field and i have no validation Error

So in the page it looks that nothing have changed. But if i submit the page, the invalid value appears in department and the error message also.

So is this a bug?

The workaround we are using is to filter LOV to show only valid values to select, or to override the setter of the entity, which i do not consider as a good practice.

test case:

Tuesday, November 3, 2009

Returning Multiple values from LOV in af:query with bind variables bug

We get nullPointerException when returning multiple values from LOV in view criteria with bind variables.

To reproduce it in EmployeesView for departmentId I added LOV that also return ManagerId.

It work fine for Forms (TestForm) and for tables(TestTable), but not for af:query with bind variables:

I created 2 view criteria with departmentId and ManagerId, 1 with bind variables and 1 with no bind variables. And 2 pages 1 for each
TestQuery1 with af:query with bind variables
TestQuery with af:query with no bind variables

When trying to select department in TestQuery1 we get:

Caused by: java.lang.NullPointerException
at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$AdfCriterionValues.(
at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$AdfAttributeCriterion.(
at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$AdfConjunctionCriterion._loadCriterionList(
at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$AdfConjunctionCriterion._loadCriterionList(
at oracle.adfinternal.view.faces.model.binding.FacesCtrlSearchBinding$AdfConjunctionCriterion.getCriterionList(
at sun.reflect.GeneratedMethodAccessor840.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(

Yet TestQuery return correctly departmentId and ManagerId.

So I guess the workaround is not to use bind variables in view criteria.

Test Case

Sunday, November 1, 2009

Workaround for Page Fragment Design view when using resource bundle

Since the layout of the fragments i am working on was messed up due to bug:

I was working on the structure view and i noticed the following worning:

So i thought what will happen if i move c:set deeper inside the tree:

And then the Design view is back to normal! and no problems at runtime also.
Note: It must be above all components that use c:set.