myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] [Commented] (MYFACES-3983) ViewScopeBinding does not work, results in an exception when using a datatable
Date Tue, 15 Sep 2015 01:08:45 GMT


Leonardo Uribe commented on MYFACES-3983:

The reason why this happens is binding attribute does not work on view scope beans. There
is a part in JSF spec that warns about the side effects of use "binding" attribute on beans
with session or similar scopes. 

The problem starts in the postback. When the view is being built, the binding from the previous
request is reused. Why? because the view scope bean still lives in http session. One could
detect this case, but the problem is "binding" attribute is used to provide custom component
creation too. I'll take a look to see if we can find a solution.

> ViewScopeBinding does not work, results in an exception when using a datatable
> ------------------------------------------------------------------------------
>                 Key: MYFACES-3983
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-344
>    Affects Versions: 2.2.7
>            Reporter: Anup
>            Priority: Minor
>         Attachments: ViewScopeTest.war
> Install the ViewScopeTest which was created from the following stack over flow posting:
> Drive a request to /ViewScopeTest/ViewScopeBinding.jsf 
> and click on one of the buttons.
> The following error occurs:
>  Exception thrown by application class 'javax.faces.webapp.FacesServlet.service:230'

>   javax.servlet.ServletException: 
>  at javax.faces.webapp.FacesServlet.service(
> at
> at [internal classes]
> Caused by: java.lang.NullPointerException: 
>  at org.apache.myfaces.view.facelets.compiler.CheckDuplicateIdFaceletUtils.createAndQueueException(
> ... 1 more
> This works fine on server with Mojarra 

This message was sent by Atlassian JIRA

View raw message