ModalPanel and JSF-Lifecycle
wyattearp Jan 6, 2011 6:03 AMHello,
I've got a problem with a Rich-Faces ModalPanel in combination with the JSF-Lifecycle. Following my XHTML-Code:
<rich:modalPanel id="panel" trimOverlayedElements ="false" width="650" height="245">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="Workingplan"></h:outputText>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
<h:panelGroup>
<h:outputLink value="#" style="color: Gray" id="hidelink">close
<rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
</h:outputLink>
</h:panelGroup>
</f:facet>
<div style="overflow: scroll; height: 150px">
<rich:dataTable id="table1" value="#{bean.wrapperList}" var="item"width="560">
<rich:column style="text-align: center; vertical-align: middle;">
<f:facet name="header">
<h:outputText value="Mo" style="font-weight: bold"></h:outputText>
</f:facet>
<h:outputText value="#{item.hoursMonday}"></h:outputText>
</rich:column>
</rich:dataTable></div>
<h:panelGrid id="entryTable" columns="1" style="text-align:left">
<!-- Header -->
<h:outputText value="Mo" />
<!-- Inputfields -->
<rich:inputNumberSpinner id="inputHoursMonday" value="#{bean.hoursMonday}" inputSize="1" maxValue="#{bean.hoursMaxValue}" step="0.5"/>
<a4j:commandButton id="buttonInsertRow" action="#{controller.insertNewRow}" value="Insert" reRender="entryTable, table1"/>
</h:panelGrid>
</rich:modalPanel>
My problem is that if I change the value in the InputNumberSpinner and click the commandButton to fill the table the appropriate setter in my BackingBean isn´t called, so the table is always filled with some outdated value (value while first rendering of the modal-panel ) of the InputNumberSpinner. It seems that the JSF-Lifecycle isn't running the way it should. I've checked it with a PhaseListener which tells me on the console which phase of the lifecycle is currently running. In addition I've put some logger in the appropriate setter-method of my backing-bean. But after clicking the button no setter is called during the "Update Model"-phase and I don't understand why ...
Has someone any idea why the setter isn´t called during the updating-model-phase of the JSF Lifecycle while rerendering the table after clicking the button?
Thanks for your help in advance ...