rich:modalPanel and ajax (UPDATE_MODEL_VALUES phase not exec
margotmedia Aug 7, 2009 4:15 PMHi!
Now I am having another problem. It's the same in two different views and I didn't found any helpful resources among the internet.
My problem seems to be the rich:modalPanel. My modalPanel code looks like the following:
<rich:modalPanel id="createDgModalPanel"> <f:facet name="header"> <h:outputFormat value="#{messages['label.addgroup']}:" > <f:param value="#{EditTrialData.tf.trial.groupName}"/> </h:outputFormat> </f:facet> <h:form><div><h:outputText value="#{messages['label.groupname']}:" /> <rich:spacer width="5"/> <h:inputText id="changeGroupNameIT" value="#{EditTrialData.newDataGroupName}"/> <br/> <rich:spacer height="10"/></div> <a:commandButton id="groupSaveButton" action="#{EditTrialData.createDg}" styleClass="button" title="#{messages['button.save']}" value="#{messages['button.save']}" reRender="dataGroupSelect" ajaxSingle="true"> <rich:componentControl for="createDgModalPanel" attachTo="groupSaveButton" operation="hide" event="onclick"/> </a:commandButton> <rich:spacer width="5" /> <a:commandButton styleClass="button" title="#{messages['button.cancel']}" value="#{messages['button.cancel']}" oncomplete="Richfaces.hideModalPanel('changeGroupNameMP')" type="reset"/></h:form> </rich:modalPanel>
When the user is going to submit the form, the backing bean value "newDataGroupName" is not set. It's always null. It's a little bit confusing to me, because the following works:
<div><rich:panel style="width:100%;"> <b><h:outputFormat value="#{messages['label.addgroup']}:" > <f:param value="#{ViewTrialData.trial.groupName}"/> </h:outputFormat></b> <rich:spacer width="8"/> <h:inputText id="addDgTf" value="#{ViewTrialData.newDataGroupName}" onclick="javascript:if(this.value=='#{messages['label.newdatagroup']}') { this.value='' };" onblur="javascript:if(this.value==''){ this.value='#{messages['label.newdatagroup']}'; }"/> <rich:spacer width="8" /> <a:commandButton id="addDgBtn" action="#{ViewTrialData.createDg}" styleClass="button" value="#{messages['button.add']}" title="#{messages['button.add']}" reRender="tree, trialFormsListPanel" eventsQueue="groupQueue" status="globalStatus" /> </rich:panel>
I can't find any significant difference between these two listings, except one time I am using a model panel and the second time I am using none.
The listing without the modal panel works fine with ajax commandButton, the second in the modal doesn't work with ajax commandButton.
I experienced this problem multiple times. Do I have a mistake in my code? Does anyone have an explanation for this?
Thanks!
regards,
margotmedia.