Hi Tobias, You could write your own ResourceHandler (--> ResourceHandlerWrapper) which wraps the createResource() methods and adjusts the filenames depending on the current ProjectStage.
Regards, Jakob 2011/3/15 Eisenträger, Tobias <[email protected]>: > Hello list, > > Is it possible to have different ResourceDependencies for components > depending on the Project Stage? > > Example - when the project is in Development Stage the context param > javax.faces.PROJECT_STAGE is set to Development > > <context-param> > <param-name>javax.faces.PROJECT_STAGE</param-name> > <param-value>Development</param-value> > </context-param> > > I want this: > > @ResourceDependencies({ > @ResourceDependency(name="jquery-ui.css",library="css"), > @ResourceDependency(name="jquery.js",library="js",target="head"), > //@ResourceDependency(name="jquery.min.js",library="js",target="head"), > @ResourceDependency(name="jquery-ui.js",library="js",target="head") > //@ResourceDependency(name="jquery-ui.min.js",library="js",target="head") > }) > @FacesComponent("de.example.jsf2.components.Accordion") > public class Accordion extends UIPanel { > > But when the Project stage is Test or Production I want this: > > @ResourceDependencies({ > @ResourceDependency(name="jquery-ui.css",library="css"), > //@ResourceDependency(name="jquery.js",library="js",target="head"), > @ResourceDependency(name="jquery.min.js",library="js",target="head"), > //@ResourceDependency(name="jquery-ui.js",library="js",target="head") > @ResourceDependency(name="jquery-ui.min.js",library="js",target="head") > })@FacesComponent("de.example.jsf2.components.Accordion") > public class Accordion extends UIPanel { > > Maybe there is a system in the Resources similar how you can add version > numbers. > > Toby > > -- Jakob Korherr blog: http://www.jakobk.com twitter: http://twitter.com/jakobkorherr work: http://www.irian.at

