I have table with two SelectOneMenu in row. I need populate data in second menu depending on the data that was selected in first. I need bypass validation phase because. I add rows to table dynamically.
+-- Table ---------------------------------------------------+
| | |
| Field 1: |____________|v| | Field 2.1: |____________|v| |
+---------------------------+--------------------------------+
| Field 1: |____________|v| | Field 2.2: |____________|v| |
| | |
+------------------------------------------------------------+
There is my code:
<h:selectOneMenu value="#{rowItem.selectedItem1}" immediate="true" valueChangeListener="#{rowItem.processValueChange}"
onchange="submit()">
<f:selectItems value="#{rowItem.selectItems1}" />
</h:selectOneMenu>
</h:column>
<h:column>
<h:selectOneMenu value="#{rowItem.selectedItem1}" >
<f:selectItems value="#{rowItem.seriesItems2}" />
</h:selectOneMenu>
..... some more elements
</h:dataTable>
In my table backing bean i have
private ArrayList<RowItem> rowItems;
I want to use processValueChange() in my class that represent RowItem but i can't, becouse i can't bind SelectOneMenu in my RowItem class.