You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2015/03/25 18:02:53 UTC
[jira] [Resolved] (MYFACES-3967) View Pooling - ViewScope missing
for Static Structure Views
[ https://issues.apache.org/jira/browse/MYFACES-3967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe resolved MYFACES-3967.
-------------------------------------
Resolution: Fixed
Fix Version/s: 2.2.8
Assignee: Leonardo Uribe
I was able to found the problem. When the view is built, a call to restoreState overrides the view scope. It is not possible to avoid that, but we can use restoreViewScope() to fix the problem. I also added some logic to deal with view root metadata facet, because it is created on ViewHandler.createView(...), so in this case we should preserve the state there too.
> View Pooling - ViewScope missing for Static Structure Views
> -----------------------------------------------------------
>
> Key: MYFACES-3967
> URL: https://issues.apache.org/jira/browse/MYFACES-3967
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.2.0, 2.2.7
> Reporter: Chris Kulinski
> Assignee: Leonardo Uribe
> Priority: Minor
> Fix For: 2.2.8
>
>
> See myfaces-users thread on the topic. http://markmail.org/thread/3enmbvaf47cm2zdn
> We needed to disable view pooling for certain views because we noticed issues with "static structure" views when using ViewScope. Our ViewScope beans are available in our controller code, but are no longer available during the RenderResponse phase in our xhtml pages - via expression language lookups.
> - On the very first request to the view (before its placed in the pool), the
> state is applied correctly - but then every subsequent request to the pooled
> view doesn't have the correct view state.
> - It looks like the view state hasn't been correctly applied on the view
> after its retrieved from the pool.
> Ways we've been able to work around this issue:
> - If we disable view pooling for these views, then the beans are correctly
> available in ViewScope.
> - We don't see this issue on any of our "dynamic structure" views - in fact,
> if we convert the static structure view to a dynamic structure view (via an
> extra ui:include with EL, etc), then the view state is mapped correctly and the viewscope beans are available.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)