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.
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.
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!!!
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"
)