Ashish Chinchulkar
Ashish Chinchulkar

Reputation: 1

How to get selected row attribute value of parent af:table on child af:table in Oracle ADF

I am using Jdeveloper 12.2.1.2.

In my adf application I have one parent table and another is child table. While clicking on row of parent af:table the rows of child table get refreshed and changed.

Now I want to manage the visibility of some columns in child table using parent table's selected row's attribute value. I want to perform this check on view layer(make af:column visble true and false depending on parents table selected rows attribute value) and don't want to use custom selectionListener.

So without using any problematically java coding I want to check value of selected row attribute from Parent table on child table. How can I do that?

Upvotes: 0

Views: 813

Answers (1)

codemonk
codemonk

Reputation: 115

I believe you can accomplish that with a combination of the default selection listener and current row.

  1. Ensure you have generated a row class (including accessors) for your parent view.
  2. make sure the selection listener property on your parent table looks like selectionListener="#{bindings.MyView1.collectionModel.makeCurrent}"
  3. Reference the desired value via the current row of the parent table to decide whether or not to render the column in the child table using something like rendered="#{bindings.MyView1.currentRow.MyAttribute}"
  4. Put the appropriate ppr in place to get the child table to rerender when the selection oft he parent table is changed.

I have implemented something very similar to this in 12.1.3 and would expect it to still work in 12.2.

Upvotes: 0

Related Questions