Oracle ADF Mobile #{row.index} is Not Supported After Installing Upgrade Patch

You had a great application working in ADF Mobile, you updated to the latest ADF Mobile patch, and then suddenly the actions you perform on a list item aren’t working anymore?

We had an ADF Mobile application, developed in JDeveloper 11.1.2.4, that worked great. In that application there is a list of items, and when you click on a list item, the header of the Panel Page changes to the name of the selected item.

Everything worked really well. We upgraded the Oracle ADF Mobile extension plugin, and suddenly this functionality stopped working!

When clicking on a list item, the item’s name was supposed to appear on the Header of the page, but after the upgrade this has not been happening.

We went over the code and we noticed that the #{row.index} code set  under the  “Set Property Listener” property was circled with a red border. This means that #{row.index} is not supported anymore. We replaced #{row.index} with #{row.rowKey} across our whole project, and now everything is working as it should be.

To sum it up: Search your code for appearance of  #{row.index} and replace it with #{row.rowKey} so you won’t have similar issues!

After this went to print our ADf Guru Steven Davlar shared his code for a more generic solution that will work if the view object have a primary key as well. See his comments below.

His suggested code is:

change amx:setPropertyListener   from=”#{row.rowKey}”  type=”action” to=”#{bindings.<view>Iterator.iterator.currentIndexWithKey}” id=”spl2″ />

Comment if you have an other patch or upgrading issues!

About these ads

10 comments on “Oracle ADF Mobile #{row.index} is Not Supported After Installing Upgrade Patch

  1. Mia, I have reported the same issue internally. Note that you solution only works when you do not specify a key attribute for the data object. If you specify a key attribute, you need to copy the value to property “currentIndexWithKey”, as follows:

    This expression also works when no key attribute is specified, so it is better to always copy to currentIndexWithKey,
    .
    Steven.

  2. Ahh, stupid, need to escape html tags… :-).
    <amx:setPropertyListener from=”#{row.rowKey}” type=”action”
    to=”#{bindings.departmentsIterator.iterator.currentIndexWithKey}” id=”spl2″/>

  3. I have a similar issue in the component list view after upgrade patch
    After update shows the following error with EL expression:
    in the component “list view” show error “Connont find property row”
    in the amx pages no resolve EL expression correctly
    URL image with errors : http://es.tinypic.com/view.php?pic=1zbqufd&s=5
    Code amx:

    code java:
    public class ConfigTMASMB {
    private Variable[] listaCiudades;
    public void setListaCiudades(Variable[] listaCiudades) {
    Variable[] oldListaCiudades = this.listaCiudades;
    this.listaCiudades = listaCiudades;
    propertyChangeSupport.firePropertyChange(“listaCiudades”, oldListaCiudades, listaCiudades);
    }

    public Variable[] getListaCiudades() {
    return listaCiudades;
    }
    }

    public class Variable {
    private String var;
    private String valor;

    public Variable() {
    super();
    }

    public Variable(String var, String valor) {
    super();
    this.var = var;
    this.valor = valor;
    }

    public void setVar(String var) {
    this.var = var;
    }

    public String getVar() {
    return var;
    }

    public void setValor(String valor) {
    this.valor = valor;
    }

    public String getValor() {
    return valor;
    }
    }

    any idea ?

    additional information:
    Oracle IDE 11.1.2.4.39.64.36.1
    Xcode 4.6.3
    Java 1.6.0_51

    sorry for my bad english

  4. amx:listView var=”row” id=”lv1″ value=”#{pageFlowScope.configTMASMB.listaCiudades}”
    amx:listItem id=”li1″ showLinkIcon=”true” action=”#{pageFlowScope.configTMASMB.goMunicipios}”
    amx:outputText value=”#{row.var}” id=”odt1″/>
    amx:setPropertyListener id=”spl2″ from=”#{row.valor}” to=”#{pageFlowScope.configTMASMB.id_ciudad}”
    amx:setPropertyListener id=”spl3″ from=”#{row.var}” to=”#{pageFlowScope.configTMASMB.ciudad}”
    /amx:listItem
    /amx:listView

    • Hi Marco,
      I went over your code.
      When you open the properties palette, do you see any variable surrounded with red? – it is probably the wrong one.
      My first guess would be: ”#{row.valor} – are you sure you have a value there? you can validate that in debug mode.

  5. I have a similar issue in the component list view after upgrade patch
    After update shows the following error with EL expression:
    in the component “list view” show error “Connont find property row”
    in the amx pages no resolve EL expression correctly

    Code amx file:

    Any idea ?

    additional information:
    Oracle IDE 11.1.2.4.39.64.64
    Xcode 5.1
    Java 1.6.0_51

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s