[
https://issues.apache.org/jira/browse/DELTASPIKE-729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Andraschko updated DELTASPIKE-729:
-----------------------------------------
Description:
If you define h:head within your site and use ds:windowId
(ClientWindowRenderMode.LAZY), then f:viewAction is called twice (2 window ids
are generated)
This was already fixed since 0.7 but broke the lazy new window detection.
i will not try to find a workaround via flash scope.
was:
If you define h:head within your site and use ds:windowId
(ClientWindowRenderMode.LAZY), then f:viewAction is called twice (2 window ids
are generated)
{code mypage.xhtml}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://xmlns.jcp.org/jsf/passthrough"
xmlns:jsf="http://xmlns.jcp.org/jsf"
xmlns:ds="http://deltaspike.apache.org/jsf">
<ui:remove>without h:head everything works correct</ui:remove>
<h:head></h:head>
<f:metadata>
<f:viewParam id="myid" name="myid"
value="#{viewParamBean.myId}"/>
<f:viewAction action="#{initCtr.initApplication()}"/>
</f:metadata>
<h:body>
<ds:windowId/>
<h:form>
#{viewParamBean.myId}
</h:form>
</h:body>
</html>
{code}
A testcase is attached.
Start application and open http://localhost:8080/jsftest22/mypage.jsf
You can see in the logs, that the viewAction is called two times.
If you remove h:head from site, viewAction is called only once, which is the
correct behaviour.
If you don't use ds:windowId and have h:head defined, then viewAction is also
called only once, which is the correct behaviour.
I don't know if this is a deltaspike bug or a bug within myfaces.
> f:viewAction is executed twice with LAZY window handling mode
> -------------------------------------------------------------
>
> Key: DELTASPIKE-729
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-729
> Project: DeltaSpike
> Issue Type: Bug
> Components: JSF-Module
> Affects Versions: 1.0.3
> Reporter: Thomas Andraschko
> Assignee: Thomas Andraschko
> Priority: Minor
> Fix For: 1.0.3
>
>
> If you define h:head within your site and use ds:windowId
> (ClientWindowRenderMode.LAZY), then f:viewAction is called twice (2 window
> ids are generated)
> This was already fixed since 0.7 but broke the lazy new window detection.
> i will not try to find a workaround via flash scope.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)