[ 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