How to get current column value of selected RichTable row from iterator in ADF

In ADF, we often have to retrieve a column value from a table selected row from outside this table.

If this table iterator is available on the current page, you can use the following function to get this value.

2 thoughts on “How to get current column value of selected RichTable row from iterator in ADF”

  1. Error:
    javax.el.ELException: java.lang.NullPointerException

    in this line:
    Row row = ((JUCtrlHierNodeBinding)richTable.getRowData(selectedRowKeyPath)).getRow();

    Can you help me?

    I develop in jdeveloper Studio Edition Version 12.2.1.3.0

    Thanks!!!

    1. Hey, Federico! Having a null pointer on this line mean that your richTable or your richTable.getRowData(selectedRowKeyPath)) variables don’t exist in the current context.
      It can happen if RichTable richTable = (RichTable)JSFUtils.findComponentInRoot(tableID); return null because the richtable with id=((YOURtableID)) doesn’t exist in the view where your action execute.
      (Verify that your table is set with the correct tableID value and exist in your current context)
      It can also happens if no line is selected in your richtable
      (verify your richTable have those properties set : selectionListener="#{bindings.YOUR_VO.collectionModel.makeCurrent}" rowSelection="single")

Leave a Reply to Fede Cancel Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top