I have a Problem and I hope somebody can help me...
I have a selectOneMenu and a commandButton to add a new table within a column depend on the choice of the selectOneMenu. But the commandButton only works the first time, the second time no more columnis add and nothing happens.
Code: Select all
<!-- Funktionsgruppen TAB -->
<!-- ============== -->
<p:tab title="#{lbl['kpmkonfiguration.headerfktgruppe']}">
<p:selectOneMenu id="fktgruppe" styleClass="fktGruppeMapping_table"
style="width:160px; margin-right:5px;"
value="#{kpmKonfigurationBean.selectedFktgruppe}">
<f:selectItem itemLabel="" />
<f:selectItems
value="#{kpmKonfigurationBean.fktgruppeForMapping}"
var="pfiffFktgruppe" itemValue="#{pfiffFktgruppe}"
itemLabel="#{pfiffFktgruppe.bezeichnung}" />
<f:converter converterId="pfiffFktgruppeConverter" />
</p:selectOneMenu>
<p:commandButton value="#{lbl['kpmkonfiguration.hinzufuegen']}"
action="#{kpmKonfigurationBean.fktgruppeHinzufuegen()}"
update="@(.fktGruppeMapping_table)"
/>
<p:dataTable value="#{kpmKonfiguration.kpmFktgruppeMappings}"
var="fktGruppeMapping" id="fktGruppeMapping_table" styleClass="fktGruppeMapping_table"
iterationStatusVar="itFktGruppeMapping" rowKeyVar="row" emptyMessage="#{msg['kpmkonfiguration.nodata_fktgruppe']}" >
<p:column styleClass="CenterColumn" style="width:70px">
<f:facet name="header">
<h:outputText value="#{lbl['kpmkonfiguration.aktion']}" />
</f:facet>
<p:commandLink styleClass="no-decor"
action="#{kpmKonfiguration.kpmFktgruppeMappings.remove(fktGruppeMapping)}"
update="@(.fktGruppeMapping_table)" >
<h:graphicImage value="/resources/images/delete.gif"
alt="delete" title="Löschen" styleClass="icon" />
</p:commandLink>
</p:column>