eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
158 stars 107 forks source link

Using @ResourceDependency doesn't add the type attribute anymore #5441

Closed rsi21 closed 2 months ago

rsi21 commented 2 months ago

Describe the bug

@resourceDependency is not setting the resource type anymore

To Reproduce

just creating a simple component adding a ressource with @ResourceDependency annotation ` @ResourceDependency(library = "lib", name = "javascript/my_component.js") public class MyComponent {

`

Expected behavior

In previous versions of Mojarra, when adding a ressource using annotation @resourceDependency, the type attribute was added dependending on the resource type. (like text/css, text/javacript..). In version 4.0.4 it is not the case anymore. Or may be it is a wanted change i missed in JSF specs ?

Screenshots

We can see here the diference between Mojarra 2.3 and 4.0.4

With Mojarra 2.3.14 (JBoss 7.4.12): image

With Mojarra 4.0.4 (JBoss EAP 8) and same resources: image

BalusC commented 2 months ago

It will automatically skip unnecessary type attribute when doctype is HTML5, this is indeed new since Faces 4.

See also https://github.com/jakartaee/faces/issues/1565 and https://balusc.omnifaces.org/2021/11/whats-new-in-faces-40.html

rsi21 commented 2 months ago

It will automatically skip unnecessary type attribute when doctype is HTML5, this is indeed new since Faces 4.

See also jakartaee/faces#1565 and https://balusc.omnifaces.org/2021/11/whats-new-in-faces-40.html

Hi @BalusC , i missed that change, Thanks for your quick feedback!