How can i dynamically change the value of a h:dataTable? I have the following code (just a snippet):
<h:dataTable value="#{DataProvider.mapValues}" var="o" border="1">
<h:column>
<h:outputText value="#{o.key}"></h:outputText>
</h:column>
<h:column>
<h:outputText value="#{o.value}"></h:outputText>
</h:column>
</h:dataTable>
<h:selectOneMenu>
<f:selectItem itemLabel="Choose Language.."></f:selectItem>
<f:selectItem itemLabel="DE"></f:selectItem>
<f:selectItem itemLabel="CZ"></f:selectItem>
<f:selectItem itemLabel="EN"></f:selectItem>
<f:selectItem itemLabel="FR"></f:selectItem>
<f:selectItem itemLabel="ES"></f:selectItem>
<f:selectItem itemLabel="PT"></f:selectItem>
</h:selectOneMenu>
So, basically, when I choose a language from the SelectOneMenu, the dataTable should use different values (like "#{DataProvider.mapValues(en)"). To be clear: everytime I select a value from the Combobox, the dataTable should reload with an other value.
I guess this would work with JavaScript, but I don't know how exactly it has to be done. Any help would be appreciated. Thanks!
EDIT: I have to use JSF1.2, so I can't use any built-in AJAX features.