Hi

I remember with jsf-uncompressed.js there is a custom ResourceLoader
that redirects javax.faces:jsf.js to that file. Maybe we can do
something similar, and create another custom ResourceLoader. See:

http://svn.apache.org/repos/asf/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/resource/InternalClassLoaderResourceLoader.java

The only question left is how users can configure this. I think a web
config param could be created. For example (suggestions about better
names are welcome)

org.apache.myfaces.JSF_JS_MODE

and these possible values:

a) normal  (by default)
b) minimal-modern
c) minimal
d) legacy
e) experimental

I think the jsf-i18n.js should be on META-INF/resources/myfaces
instead META-INF\internal-resources\javax.faces .

Does this sounds good? suggestions are welcome.

regards,

Leonardo Uribe

2011/10/19 Werner Punz <[email protected]>:
> Hi everyone, I finally am through with my code refactoring with the
> exception of a small patch which must be done after the next step.
>
> The next step would be following:
> I have now several files.
>
> a) *The jsf.js* which is the existing über file
> b) *jsf-minimal-modern.js* which is the core jsf with a baseline of ie9+
> c) *jsf-minimal.js* which is the same with a baseline of ie6
>
> d) *jsf-i18n.js* which is the i18n language messages as separate include,
> which can be added to b and c if needed.
>
> e) *jsf-legacy.js* which is only the code needed for firefox 3.5+ and ie6+
> support (legacy browser suppot) in addition to minimal-modern.js
>
> f) *jsf-experimental.js* experimental features which very likely will make
> it into future jsf versions, which also can be added to  b and c
> (a has them in already)
>
> So far this works out very well, but I am not sure where to host the files
> and how do we include it. Currently they are located on the same location as
> our uncompressed debugging files.
>
> Ideally it should be that we can write something like
>
>  <h:outputScript name="jsf-minimal-modern.js" library="myfaces"
> target="head"/>
>  <h:outputScript name="i18n.js" library="myfaces" target="head"/>
>
> And the links are correctly set and also a jsf.js include from an f:ajax or
> h:outputScript is subsequently suppressed.
>
> But we probably need a patch in our impls for that mechanism.
>
> Once this is established we can switch our standard file from *a* to *c*
> which makes more sense for almost all users. Leo what is your opinion on
> that.
>
> Another option would be to allow a config param via web.xml so that one of
> the core *jsf.js* files is loaded as *jsf.js* and then add for instance
>
>  <h:outputScript name="i18n.js" library="myfaces" target="head"/>
> additionally. But even then I think we need a patch to reach the proper
> location for the additional files.
>
>
>
> Werner
>
>
>
>

Reply via email to