Bruno Aranda | 9 Feb 19:10
Picon

Myfaces 2.1.6 change of behaviour for h:outputScript

Hi,

I can see there are some improvements related to the resource handling and
to fix a security problem in MyFaces 2.1.6. However, now the behaviour for
h:outputScript seems to have changed and subfolders are not allowed in the
"library" attribute.

Before I could do things like:

<h:outputScript library= "javascript/mysuperlibrary"
name="mysuperscript.js" />

And now the resource handler complains with a warning:

09-Feb-2012 18:04:21 org.apache.myfaces.renderkit.html.HtmlScriptRenderer
encodeEnd
WARNING: Resource referenced by resourceName mysuperscript.js and
libraryName javascript/mysuperlibrary not found in call to
ResourceHandler.createResource. It will be silenty ignored.

Am I doing something wrong? Do I need my own ResourceHandler if I want to
have all my resources in their subfolders, resulting in a more tidy project?

Cheers,

Bruno
Thomas Andraschko | 9 Feb 19:13

Re: Myfaces 2.1.6 change of behaviour for h:outputScript

Hi,

why you can't use the directory in the name attribute?

<h:outputScript library="javascript" name="mysuperlibrary/mysuperscript.js"
/>

Regards,

Thomas

2012/2/9 Bruno Aranda <brunoaranda <at> gmail.com>

> Hi,
>
> I can see there are some improvements related to the resource handling and
> to fix a security problem in MyFaces 2.1.6. However, now the behaviour for
> h:outputScript seems to have changed and subfolders are not allowed in the
> "library" attribute.
>
> Before I could do things like:
>
> <h:outputScript library= "javascript/mysuperlibrary"
> name="mysuperscript.js" />
>
> And now the resource handler complains with a warning:
>
> 09-Feb-2012 18:04:21 org.apache.myfaces.renderkit.html.HtmlScriptRenderer
> encodeEnd
> WARNING: Resource referenced by resourceName mysuperscript.js and
(Continue reading)

Bruno Aranda | 9 Feb 19:19
Picon

Re: Myfaces 2.1.6 change of behaviour for h:outputScript

Good, that works. Thanks. Only that IntelliJ IDEA does not like it much.

Another issue I have found though is with the composite components
namespace. Before I could have:

xmlns:iv="http://java.sun.com/jsf/composite/mysuperlibrary/components"

And now that does not seem to work. You can always move "components" to the
"resources" folder, but I wonder if subfolders can be used there or if I am
using a wrong namespace...

Thanks,

Bruno

On 9 February 2012 18:13, Thomas Andraschko <zoigln <at> googlemail.com> wrote:

> Hi,
>
> why you can't use the directory in the name attribute?
>
> <h:outputScript library="javascript" name="mysuperlibrary/mysuperscript.js"
> />
>
> Regards,
>
> Thomas
>
> 2012/2/9 Bruno Aranda <brunoaranda <at> gmail.com>
>
(Continue reading)

Werner Punz | 13 Feb 17:00
Picon

Re: Myfaces 2.1.6 change of behaviour for h:outputScript

Am 09.02.12 19:19, schrieb Bruno Aranda:
> Good, that works. Thanks. Only that IntelliJ IDEA does not like it much.
>
Thats a bug in IDEA, I would suggest to file a bugreport. I cannot 
remember if I already filed one regarding this issue.

Leonardo Uribe | 9 Feb 19:22
Picon

Re: Myfaces 2.1.6 change of behaviour for h:outputScript

Hi

According to the spec wording (JSF 2.0 spec section 2.6.1.3), it is
invalid to have '/' in library names. A new web config param was
added:

org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME

by default false. Enable it to true solves the problem.

See

https://issues.apache.org/jira/browse/MYFACES-3454

for details.

Resource names can always have slashes.

regards,

Leonardo Uribe

2012/2/9 Thomas Andraschko <zoigln <at> googlemail.com>:
> Hi,
>
> why you can't use the directory in the name attribute?
>
> <h:outputScript library="javascript" name="mysuperlibrary/mysuperscript.js"
> />
>
(Continue reading)

Bruno Aranda | 9 Feb 19:27
Picon

Re: Myfaces 2.1.6 change of behaviour for h:outputScript

Good. That answers as well the problem with the composite component
namespaces.

Thanks Leonardo and Thomas!

Bruno

On 9 February 2012 18:22, Leonardo Uribe <lu4242 <at> gmail.com> wrote:

> Hi
>
> According to the spec wording (JSF 2.0 spec section 2.6.1.3), it is
> invalid to have '/' in library names. A new web config param was
> added:
>
> org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME
>
> by default false. Enable it to true solves the problem.
>
> See
>
> https://issues.apache.org/jira/browse/MYFACES-3454
>
> for details.
>
> Resource names can always have slashes.
>
> regards,
>
> Leonardo Uribe
(Continue reading)


Gmane