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 67FF29E0A for ; Fri, 24 Feb 2012 20:12:13 +0000 (UTC) Received: (qmail 6328 invoked by uid 500); 24 Feb 2012 20:12:13 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 6279 invoked by uid 500); 24 Feb 2012 20:12:13 -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 6272 invoked by uid 99); 24 Feb 2012 20:12:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 20:12:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 20:12:09 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9A2583381D8 for ; Fri, 24 Feb 2012 20:11:48 +0000 (UTC) Date: Fri, 24 Feb 2012 20:11:48 +0000 (UTC) From: "Prakash Udupa (Created) (JIRA)" To: dev@myfaces.apache.org Message-ID: <594916668.16521.1330114308632.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (TRINIDAD-2226) Provide mechanism to reload skin definitions from trinidad-skins.xml MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Provide mechanism to reload skin definitions from trinidad-skins.xml -------------------------------------------------------------------- Key: TRINIDAD-2226 URL: https://issues.apache.org/jira/browse/TRINIDAD-2226 Project: MyFaces Trinidad Issue Type: Improvement Components: Skinning Affects Versions: 2.0.2-core Reporter: Prakash Udupa Currently there is no way to be able to update the skins to an app at runtime without needing to restart the app. Request here is to provide it in Trinidad's skinning framework. Requirement: Provide an API that complies to the following: ------------------------------------------------------------------------------------- 1. Reads (or marks it dirty so that it is read in next request) trinidad-skins.xml and update the new skin definitions as per its contents 2. Subsequent requests on the webapp should reflect the skin definitions from trinidad-skins.xml that was re-read 3. Should be statically called (because the clients of such API are usually deployment tools that work outside of JSF lifecycle) 4. Cannot depend on any context object other than ServletContext (because that is what a non-JSF entry point to this API can provide) Proposed API: --------------------- 1. New public non-static method in 'org.apache.myfaces.trinidad.skin.SkinFactory' /** * Reloads the skins that was registered with this factory. * Subclassers are expected to provide the implementation. */ public void reload() - We implement this in 'org.apache.myfaces.trinidadinternal.skin.SkinFactoryImpl'. In this implementation we will preserve the order in which we register skins, which is the following: a) Register the base skins in Trinidad b) Give chance to all registered Configurator services to attach their skins to the SkinFactory programatically. c) Read trinidad-skins.xml from META-INF and WEB-INF, and for the skin definitions in there, create Skins and register with the SkinFactory - Clients will call 'SkinFactory.getFactory().reload();' after updating the trinidad-skins.xml to be able to reload the skins in the next request to the app (browser cache clearance / Ctrl+F5 is of course needed). 2. New public method in 'org.apache.myfaces.trinidad.config.Configurator' /** * The skinning framework calls this method to notify Configurators that the specified SkinFactory has been reloaded. * The Configurator implementations may choose to reload skins here. * @param externalContext the external context * @param factory the SkinFactory instance to which the skins can be reloaded */ public void reloadSkins(ExternalContext externalContext, SkinFactory factory){} - This method will be no-op in the Configurator class, and can optionally be implemented by any registered configurator services. - The reload() method noted in #1 above will call this method on all registered configurator services before attempting to register the skins from trinidad-skins.xml that it will re-read now. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira