Showing posts with label workaround. Show all posts
Showing posts with label workaround. Show all posts

Friday, November 11, 2011

ADF 11.1.2.1 - clicktoedit table, createinsert, rollback bug?

ADF version: 11.1.2.1
Firefox: 5.0

Prerequistes

-Using ADF BC
-Create the most simple jsf page declarativly (no custom java code)
--table features: single selection, sorting, filtering
--change table attributes: editingMode=clickToEdit

Steps to reproduce

1. start http://127.0.0.1:7101/TestInsertIntoClickToEditTable2-ViewController-context-root/faces/view1

0000@2660_2660-412669e935ee8dd8

[notice the yellow marked rows.]

2. Now Click on CreateInsert

0001@2660_2660-412669e9366af37c

OK, new row is inserted and can be edited now.

3. Click on Rollback-Button (or Execute-Button)

0002@2660_2660-412669e937240796

What happened to the last two rows?

Further issue: clicktoedit not working on some rows

0003@2660_2660-412669e9385e0e69

You may click as often you want. The row won't change into edit mode. In the log window you will see

<FacesCtrlHierBinding$FacesModel> <makeCurrent> ADFv: Keine Zeile gefunden für rowKey: [oracle.jbo.Key[191 ]].

Known workaround so far

1. Click the Execute-Button after Rollback.

2. Bind Rollback action to a backing bean method and do the following (Rollback + setActiveRowKey)

/**
* Rollsback and Re-Executes the table iterator
* @param actionEvent
*/
public void onRollback(ActionEvent actionEvent) {
    final DCBindingContainer bc = (DCBindingContainer)getBindings();
    bc.getOperationBinding("Rollback").execute();

    setActiveRowKey(bc);
}

/**
*
* @param bc
*/
private void setActiveRowKey(final DCBindingContainer bc) {
    final DCIteratorBinding empIter = bc.findIteratorBinding("EmployeesView1Iterator");
    final Row newRow = empIter.getCurrentRow();
    final ArrayList activeRowKeyList = new ArrayList();
    activeRowKeyList.add(newRow.getKey());
    getEmpTable().setActiveRowKey(activeRowKeyList);
}

public BindingContainer getBindings(){
    return BindingContext.getCurrent().getCurrentBindingsEntry();
}

Download

Sample Application: http://www.box.net/s/od2t8en8ojo3hho704uz

Similiar issues

http://adfbugs.blogspot.com/2010/03/rollback-does-not-refresh-current-row.html

Saturday, October 8, 2011

[solved] Download offline bc4j-junit_bundle 11.1.2.1 version/download link mismatch

Applies to: JDeveloper 11.1.2.1

Download from: http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/131167.xml#oracle.BC4J.junit

Problem description

Trying to install the downloaded bc4j-junit_bundle offline version as extension I get the following error

0001@2612_2612-412669a31839a5bc

Analysis

Open the corresponding bundle ZIP an lets see if it is really wrong version

0000@2612_0-412669a316db363c

But as you can see I have downloaded the correct version. So there is a mismatch.

Solution

After further investigating the download link I realized that it just references the old version

http://download-llnw.oracle.com/otn-pub/jdeveloper/11.1.2.0.0/extensions/bc4j-junit_bundle.zip

So let's try to adjust manually the URL und download

http://download-llnw.oracle.com/otn-pub/jdeveloper/11.1.2.1.0/extensions/bc4j-junit_bundle.zip

é voilà now the installation works fine as well

0002@2612_2612-412669a3198bf259

[solved] JDeveloper - Install Extensions offline / licences check issue

Applies to: JDeveloper 11.1.2.1

Issue

0000@2607_2607-412669a3102f0735

Results in

0001@2607_2607-412669a31054f43e

The impact is that you are unable to install JUnit-Extension in a Workshop Lab e.g. where

you can't assume that the attendees have an internet connection

Workaround

Because we are quite smart let's workaround....

Open Bundle with your favourite archiver tool

and remove or comment out the following line

<u:requires-agreement url="http://junit.sourceforge.net/cpl-v10.html" />

0002@2607_2607-412669a312de3ef5

Save change and Update Archive.

Import extension again.

0003@2607_2607-412669a3138e38e4

=> No license check requirement shows up. Yeeeees we can!