You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Alexandru Basarab (JIRA)" <de...@myfaces.apache.org> on 2011/04/01 16:35:06 UTC

[jira] [Created] (TRINIDAD-2077) Lifecycle executed twice for dialog page in Firefox 3.5.3

Lifecycle executed twice for dialog page in Firefox 3.5.3
---------------------------------------------------------

                 Key: TRINIDAD-2077
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2077
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Archetype
    Affects Versions: 1.2.14-core 
         Environment: MyFaces 1.2.9 / Trinidad 1.2.14 / Tomcat 6.0.20 / java 1.6.0_16 / browser Firefox 3.5.3
            Reporter: Alexandru Basarab


1. in faces-config.xml have next configuration:
<lifecycle>
<phase-listener>com.xxx.listener.OnRenderPhaseListener</phase-listener>
</lifecycle>

2. public class OnRenderPhaseListener implements PhaseListener {
...
@Override
	public void beforePhase(PhaseEvent event) {
//check if it is not partial request and it is not a postback
//continue logic here
...
}
...
}

3. Code which triggers dialog to open:
<tr:commandLink
					text="Open Dialog"
					shortDesc="Open Dialog"
					immediate="true"
					blocking="true"
					rendered="true"
					action="dialog:gotoMyDialog"
					useWindow="true"
					partialSubmit="true"
					windowWidth="500"
					windowHeight="400">
				</tr:commandLink>

4. When opening a Dialog page on Firefox the method beforePhase is executed twice (expected to be executed only once as for normal pages) and it results in executing two times the business logic (which access the DB and prepare the data to be rendered on the screen).

The problem appears only for Dialogs under Firefox. For normal pages (non-dialog) and other browsers (tested with IE7 and Chrome) the behavior is normal.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira