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 4781010B2A for ; Thu, 25 Jul 2013 22:21:50 +0000 (UTC) Received: (qmail 11803 invoked by uid 500); 25 Jul 2013 22:21:50 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 11768 invoked by uid 500); 25 Jul 2013 22:21:49 -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 11603 invoked by uid 99); 25 Jul 2013 22:21:48 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jul 2013 22:21:48 +0000 Date: Thu, 25 Jul 2013 22:21:48 +0000 (UTC) From: "Jeanne Waldman (JIRA)" To: dev@myfaces.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (TRINIDAD-2402) mechanism to setup a new component binding context MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TRINIDAD-2402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13720140#comment-13720140 ] Jeanne Waldman commented on TRINIDAD-2402: ------------------------------------------ Revision: 1507045 Author: jwaldman Date: 9:11:10 AM, Thursday, July 25, 2013 Message: TRINIDAD-2402 mechanism to setup a new component binding context thanks to Pavitra Subramaniam for the patch ---- Modified : /myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContext.java Modified : /myfaces/trinidad/trunk/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentELTag.java Modified : /myfaces/trinidad/trunk/trinidad-api/src/main/xrts/org/apache/myfaces/trinidad/resource/LoggerBundle.xrts > mechanism to setup a new component binding context > -------------------------------------------------- > > Key: TRINIDAD-2402 > URL: https://issues.apache.org/jira/browse/TRINIDAD-2402 > Project: MyFaces Trinidad > Issue Type: Improvement > Affects Versions: 2.0.1-core > Reporter: Pavitra Subramaniam > Attachments: trinidad-2402.patch > > > There are usecases where a custom tag that provides the ability to load dynamic layouts (or page fragments) based on app flow, requiring that new components be re-created when the tag is executed and a new layout different from the current one needs to be loaded. > Merely deleting the component sub-trees in the tag handler does not entirely address the issue because when the tag is re-executed today, if a binding EL is set on the component, then the component instance held by the backing bean instance (typically a reuqest scoped bean) get reused instead of a new component being created. > In order to force create the component instance, this new API will allow tag handlers to notify the framework by starting a new "component binding context". Between a pair of push and pop calls, component bindings will be cleared allowing for new component instances to be created and pushed to the backing bean. > /** > * Starts a new component binding context. Typically called from tag handlers when component > * bindings in its subtree needs to be cleared, forcing the creation of new components. > * > * @param context FacesContext instance > * @see RequestContext#popComponentBindingContext > * @see RequestContext#isInComponentBindingContext > */ > public static void pushComponentBindingContext(FacesContext context) > { > } > /** > * Pops out of the last pushed component binding context. Component binding instances will not be > * cleared after popping out the outermost context. > * > * @param context FacesContext instance > * @see RequestContext#pushComponentBindingContext > * @see RequestContext#isInComponentBindingContext > */ > public static void popComponentBindingContext(FacesContext context) > { > } > /** > * Returns true if we are currently within a component binding context. > * > * @see RequestContext#pushComponentBindingContext > * @see RequestContext#popComponentBindingContext > */ > public static boolean isInComponentBindingContext(FacesContext context) > { > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira