0

I am using MyFaces Trinidad, and want to create a single page where selection in one table reloads the content of another table to match the selection.

The update is triggered by an actionListener in a partialSubmit. Then I wanted the listener in the backing bean to remember the row object of the submit, such that the getter for the value of the second table can use this as a filter.

The Trinidad documentation includes this sample, but this syntax is deprecated in JSF 1.2:

FacesContext context = FacesContext.getCurrentInstance();
MyClass selection = (MyClass)context.getVariableResolver().
    resolveVariable(context, "rowdata");

Anybody got a good suggestion?

Timo
  • 902
  • 1
  • 10
  • 21

2 Answers2

1

The JSF 1.2 way is using ELResolver. Also see the deprecation notes in the javadoc of VariableResolver. A more common JSF 1.2 alternative is the Application#evaluateExpressionGet(). Code examples can be found here.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
0

You may find this post helpful: http://ocpsoft.com/java/jsf-java/jsfs-hdatatable-vs-uirepeat-how-to-get-the-selected-row/

Lincoln
  • 3,151
  • 17
  • 22