This content has been marked as final.
Show 4 replies
-
1. Re: should rerender happen when errors exist?
ilya_shaikovsky Sep 18, 2008 8:07 AM (in response to achildress)You could bind reRender to some bean property List and fill this list in actionListener. If validation fails - this code will not beexecuted and reRender will eb empty. ;)
-
2. Re: should rerender happen when errors exist?
achildress Sep 18, 2008 8:26 AM (in response to achildress)I've tried that, but the reRender of the id that was originally in the backing bean property referenced by the reRender attribute of the tag is still being reRendered. It is as if the reRender of the existing page ids is happening before the change of the backing bean property is obtained. For instance, if I code the commandButton this way:
<a4j:commandButton status="majorstatus" id="saveButton" value="Search" actionListener="#{DCCCaseBean.doAOCDOCSearch}" oncomplete="checkerrors();" reRender="#{IntakeMenuBean.reRender}">
IntakeMenuBean.reRender is a String attribute with the value of "maincontent". Then in the DCCCaseBean.doAOCDOCSearch actionListener method, I change IntakeMenuBean.reRender to an empty String, or even some other value as follows:FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_ERROR, "hey", "hey")); IntakeMenuBean anIntakeMenuBean = (IntakeMenuBean)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("IntakeMenuBean"); anIntakeMenuBean.setReRender("searcherrors");
maincontent is still being reRendered instead of searcherrors when the page is repainted. I don't understand why this is happening. -
3. Re: should rerender happen when errors exist?
ilya_shaikovsky Sep 18, 2008 8:29 AM (in response to achildress)because the bean with this property should be request scoped ;)
-
4. Re: should rerender happen when errors exist?
achildress Sep 18, 2008 12:48 PM (in response to achildress)why would scope make any difference?