This content has been marked as final.
Show 3 replies
-
1. Re: Bean executed twice - while calling and exiting the web
nbelaevski Feb 18, 2009 8:41 AM (in response to aish)Hello Aishu,
I guess the bean is executed to process submitted data. There's not enough information to say more. -
2. Re: Bean executed twice - while calling and exiting the web
darmstadter Feb 19, 2009 3:25 AM (in response to aish)I have the same question as Aishu. The setter/getter method will executed many times, if it is go to a ui:component or leave it. e.g. A wizard is implemented with modalPanel. Along steps, there is a combbox in the modalPanel, the setter/getter methods of the components h:selectOneMenu and f:selectItems will executed by enter or leave the step. I guess, that the reason is, there are manny ajax component as well as e.g js:function.
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="https://ajax4jsf.dev.java.net/ajax" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:dim="http://dimetis.de/jsf"> <rich:panel styleClass="backgroundNet" style="height:275px"> <a4j:outputPanel id="createTaskType"> <h:panelGrid style="margin-left:60px; margin-top:10px;"> <h:selectOneMenu style="width : 360px;" immediate="true" value="#{createTaskDialogBean.taskType}"> <f:selectItems value="#{createTaskDialogBean.taskTypes}" /> <a4j:support event="onchange" ajaxSingle="true" oncomplete="item='#{createTaskDialogBean.taskType}';" reRender="playoutId"/> </h:selectOneMenu> <rich:separator height="1px" style="margin-top:7px;"/> </h:panelGrid> </a4j:outputPanel> </rich:panel> <h:panelGrid columns="3" style="margin-top:8px;vertical-align:bottom"> <rich:spacer width="190px" /> <a4j:commandButton action="#{createTaskDialogBean.refreshBean}" reRender="createTaskType" onclick="Richfaces.hideModalPanel('taskWizard');" value="Cancel" style="float:right; width:110px; height:30px;"/> <a4j:commandButton value="Next >>" immediate="true" style="float:right; width : 110px; height:30px;" styleClass="createTaskStep1Object" action="#{createTaskDialogBean.getTaskType}" onclick="startWait();" oncomplete="stopWait();"/> </h:panelGrid> <script> initCreateTaskStep1Object(); </script> <a4j:jsFunction name="closeDlgtaskWizard" action="#{createTaskDialogBean.refreshBean}" reRender="createTaskType" oncomplete="Richfaces.hideModalPanel('taskWizard');" /> </ui:composition>
-
3. Re: Bean executed twice - while calling and exiting the web
nbelaevski Feb 19, 2009 8:37 AM (in response to aish)You can use PhaseTracker to check on what lifecycle phases the methods are accessed.