Return-Path: X-Original-To: apmail-myfaces-dev-archive@www.apache.org Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CC27B19499 for ; Mon, 4 Apr 2016 15:08:31 +0000 (UTC) Received: (qmail 34588 invoked by uid 500); 4 Apr 2016 15:08:26 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 34481 invoked by uid 500); 4 Apr 2016 15:08:26 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 33639 invoked by uid 99); 4 Apr 2016 15:08:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2016 15:08:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 988432C1F60 for ; Mon, 4 Apr 2016 15:08:25 +0000 (UTC) Date: Mon, 4 Apr 2016 15:08:25 +0000 (UTC) From: "Leonardo Uribe (JIRA)" To: dev@myfaces.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (MYFACES-4041) EL evaluation fails when state is saved because FaceletState object is not present MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Leonardo Uribe created MYFACES-4041: --------------------------------------- Summary: EL evaluation fails when state is saved because FaceletState object is not present Key: MYFACES-4041 URL: https://issues.apache.org/jira/browse/MYFACES-4041 Project: MyFaces Core Issue Type: Bug Components: JSR-344 Affects Versions: 2.2.9 Reporter: Martin Marinschek Assignee: Leonardo Uribe Priority: Blocker DefaultFaceletsStateManagementStrategy.saveView(...) contains some lines of code that do this: {code:java} states = new HashMap(); faceletViewState = view.getAttributes().get(ComponentSupport.FACELET_STATE_INSTANCE); if (faceletViewState != null) { ((Map)states).put(ComponentSupport.FACELET_STATE_INSTANCE, UIComponentBase.saveAttachedState(context, faceletViewState)); //Do not save on UIViewRoot view.getAttributes().remove(ComponentSupport.FACELET_STATE_INSTANCE); } {code} The problem is FaceletState is removed to be serialized, but FaceletState is also used for EL expressions (see FaceletStateValueExpression), so every EL expression that is evaluated when the state is being saved that depends on this map throws NullPointerException. The problem has been experienced by other users before (see MYFACES-4023 for details), but in the case reported here (treeTable component and dynamic columns) there is no other possible workaround than to preserve FaceletState object so the EL can be properly evaluated. The solution is use the transient state helper map to hold FaceletState and change FaceletStateValueExpression to scan for this condition. -- This message was sent by Atlassian JIRA (v6.3.4#6332)