jvx

How to make a filter selection dependent on the selection of another filter with the JVX Framework?


I have a screen in my project with some filters (dropdown list) and I want to make the selection of some filters depending on the selection of a specific filter.

I have unfortunately not found a method for the filter to do this, but know it is possible with the JVX Framework.


Solution

  • In this case, you have two options: Use foreign key references with overlaping columns. If foreign keys are correct defined, dependent values will be filtered automatically.

    It's also possible to change values manually. Simply listen for valueChanged on editor A and set an additional filter condition for linked cell editor of B and C. To access the cell editor, simply call:

    ((ILinkedCellEditor)UICellEditor.getCellEditor(A.getUIResource())).setAdditionalCondition(condition);
    

    The additional condition will be applied to the original filter with and operator.

    The A.getUIResource() is needed with current JVx but future versions will work with A only.