Tuesday, December 20, 2011

Access Keys are accessible even from a modal popup

When a popup is open in a page in default (modal) mode then the rest of the components of the page are not accessible with mouse, yet if buttons have Access keys they are still functional allowing the user to brake the functionality.

n the attached test case run testpopup page
Press Edit button to open popup
Press Alt+Shift+c access key of Commit button

Expected: Nothing should happen
Actual: Commit is performed and popup is closed.



Test case.

SR is posted for this and Bug 13338347: ACCESS KEYS SHOLD BE DISABLED BASED ON THE CONTEXT

Yet the Oracle development consider this as a Browser issue. 'The issue is not in the scope of the ADF Product as this is the feature of the browser. '

We are working on a workaround about this issue.
We are based on the fact that when a button is disabled then the access key is not functional.
So on popup FetchListeners we disable the buttons of the main page and on popupCancelListeners we enable buttons again.
It seems to work, yet we need to check any side effect and we need to implement it for all popups.

Thursday, October 6, 2011

Pressing 'Tab' in LOV field new bug in jdeveloper 11.1.2.1

Trying to evaluate latest version of jdeveloper 11.1.2.1 in order to migrate our applications that is still in 11.1.1.4 i hit on the following bug.

While navigating through panel form fields with tab key, all validations of the page are thrown as if a full submit was performed.
This happens when you have input list of value field and the focus is on the field and you press tab key. The input list of value is autosubmit in order to refresh other fields

In the test case run testTab page and press CreateInsert button. Click on Department or Job List of value field and press Tab key. All validations of the page appear.
I also notice that errors appear in Greek even though my browser language is in English.



Test Case:
http://adfbugs.googlecode.com/files/TestLOVTab.zip

Bug 11939353 was already logged in oracle support which is fixed in a future release.

also in OTN Thread: Validation issue
https://forums.oracle.com/forums/thread.jspa?threadID=2254388&start=15&tstart=0

According to this thread a workaround exist in Didier's blog:
How To Avoid The JBO-27014 Error During The AutoSubmit

Sunday, August 28, 2011

Cannot use a region in a page more than one time?

In our application we use regions for reusability and consistency.
For example we have An address region that we reuse in order to show and edit a person address and a company address. We pass the address owner as a parameter to the region in order to show corresponding data.

Yet if regions are placed in the same page then both regions show the same data even if they get different parameters.

This is because of automatic application modules nesting.
The framework see that AddressModule is already in data control and it use the same for both regions due to shared data control scope.

It does not happen if we don't use shared data control scope, yet then we have a different database connection for each region. It does not seems right to have different connection to get different data!!?

In the test case i have a simple Department Task flow that query for specific department depending on passed parameter inDepId


Then in a page i place the same region 2 times with different parameter passed in each region.
Yet when i run the application both regions show the same data.



Is there a way to show different data without having different database connection?

Test Case:

http://adfbugs.googlecode.com/files/TestRegions.rar

Tuesday, August 16, 2011

Rollback is executed when a region is refreshed

We are using Task flows as regions in jdeveloper 11.1.1.4 in the latest project.
I have just noticed that when a region refreshes then a data control transaction rollback is executed transparently.
This does not happen the first time the region is displayed but every time it is refreshed after that.
This cause unexpected behavior of loosing data and the current rows of any other shared transaction task flow.

Could this be an expected (designed) functionality? Why?

As a test case I have 2 application modules (DepartmentsModule and Employees module) and a page that has departments and a region that has Employees with ‘share transaction if possible’ in the EmployeesTaskFlow.
Also the EmployeesTaskFlow get as parameter the current DepartmentId and has Refresh condition ifNeeded so that it refresh every time I navigate into departments.

Yet when I press next button I loose any change made on current department and I stay in the same row.
What I see in log is that Rollback is executed as a consequence of region Refresh and releaseViewPort.



Is this expected behavior or a bug?

I will check also what happens in 11.1.2 that it seems the nesting implementation have changed:
http://one-size-doesnt-fit-all.blogspot.com/2011/08/task-flows-sayonara-auto-am-nesting-in.html

It reproduce also in 11.1.2

Test Case
http://adfbugs.googlecode.com/files/TestRegionRollback.zip

A Perfect explanation and solution is given by Oracle Support. I will put it as is here:
@ At the point when the customer decided the region should share the
@ transaction with its parent, he also made the region a potential actor on the
@ parent transaction. Since the transaction mode on the region is not 'Always
@ Use Existing Transaction', the region transaction is not necessarily created
@ by the parent (and I will come back to that later), the behavior of the
@ region becomes the behavior of the parent even if they don't share the same
@ datacontrol. That is because both datacontrol are in one transaction since
@ the transaction is shared. When the region refresh, it rollback the
@ transaction which rollback both datacontrol.
@ .
@ To make the share mode work, the main point the customer should pay attention
@ to is that the transaction should be created by the parent, not by the
@ region. If it is created by the region, then the region become the owner of
@ the transaction and will rollback when the region is refreshed. If the
@ transaction was created by the parent it will work as expected.
@ .
@ What you need to do is ensure that the transaction is owned by the parent.
@ You need to have it created before the region. They are several ways to do
@ that:
@ 1) Have the parent page in a bounded taskflow with 'Always Begin New
@ Transaction' mode on.
@ 2) Call beginTransaction() on the DataControlFrame in an action that
@ navigates to the parent page with the region.
@ 3) Have a method activity that executes beginTransaction() on a request bean
@ before navigating to the parent page with the region.
@ The code to do begin the transaction is:
@ .
@ public void beginTransaction()
@ {
@ BindingContext context = BindingContext.getCurrent();
@ .
@ String dcFrameName = context.getCurrentDataControlFrame();
@ DataControlFrame dcFrame = context.findDataControlFrame(dcFrameName);
@ dcFrame.beginTransaction(new TransactionProperties());
@ }
@ .
@ To prevent the region from owning the transaction and run into these types of
@ issue for share mode, you can set the transaction mode on the taskflow to:
@ or 'Always Use Existing Transaction' in the
@ property inspector. If the transaction does not exist, an exception is
@ thrown.
@ .
@ I modified the original test case to illustrate the different options. Open
@ the workspace and look at adfc-config.xml. Run the Start page, withoutTrans
@ is the original test case, withTrans and beginTrans are 2 options that work.
@ .


Resolution Test Case
http://adfbugs.googlecode.com/files/TestRegionRollback2.zip
Hello

Unfortunately it seems that the issue is not fully resolved.
This works until a Data control frame commit or Rollback is executed.
Then it seems that the parrent looses control again of the transaction and regions rollback again on every refresh...
In the test case i added 2 buttons that do :

DataControlFrame dcFrame = context.findDataControlFrame(dcFrameName);
dcFrame.commit();
and
DataControlFrame dcFrame = context.findDataControlFrame(dcFrameName);
dcFrame.rollback();

The test case work fine until any of the commit or rollback transaction is pressed
Then Next button still causes rollback to be executed.

This means that still i cannot control the full data control frame transaction when i have regions with parameters.

New test case
http://adfbugs.googlecode.com/files/TestRegionRollback3.zip

Sunday, June 26, 2011

Table Filter Number format bug

In a filterable table when we typed a number with decimals we got the following error:


It is an oracle database error that shows that the number entered in criteria is not converted correctly according to the locale of the database.
Same value in Search criteria works correctly.




So is this a bug?


Test case is on 11.1.2. It reproduce also in 11.1.1.4



I guess you need a database with different locale to reproduce (a locale that decimal ceparator is ',')

Tuesday, June 7, 2011

First jdeveloper 11.1.2 bug

For start let me say that i am impressed positively with the new jdeveloper development experience.
Fast and furious
Yet I hit on the first bug already.
I used the default oracle three column layout and created a jsf page with a panel box
On runtime when I tried to disclose first empty column I got a java script error




Is it a problem of old template?
Is it a problem of combination of jspx template with Facelet page?
Will see…
Test case
http://adfbugs.googlecode.com/files/Application5.rar