You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Vicente Rossello <co...@gmail.com> on 2020/01/12 23:16:22 UTC
Myfaces 2.3-next-M1
Hi,
I found another difference between 2.3.6 and 2.3-next-M1, not sure if it's
a bug, but it can impact some users.
I have a custom headRenderer to inject resources:
@ResourceDependency(library = "javax.faces", name = "jsf.js")
public class HeadRenderer extends Renderer {
...
}
And then a simple page with a commandlink:
<f:view contentType="text/html">
<h:body role="document">
hello
<h:form>
<h:commandLink >This link throws js exception in 2.3</h:commandLink>
</h:form>
</h:body>
</f:view>
(notice there is no <head> element)
This works in 2.3.6 but throws a js exception in 2.3-next because
jsf.js has not been loaded.
A simple workaround is to declare an empty <head> element
I have set up an example in https://github.com/cocorossello/tomee-example
(The custom renderer does not make a difference anyway, but the example has it)
Re: Myfaces 2.3-next-M1
Posted by Thomas Andraschko <an...@gmail.com>.
Fixed: https://issues.apache.org/jira/browse/MYFACES-4316
Am Mo., 13. Jan. 2020 um 09:16 Uhr schrieb Thomas Andraschko <
andraschko.thomas@gmail.com>:
> Also note that we don't had an unittest regarding this, so it may a
> "magic" feature of older versions.
> However, i will invest 5 minutes why it worked before ;)
>
> Am Mo., 13. Jan. 2020 um 09:08 Uhr schrieb Thomas Andraschko <
> andraschko.thomas@gmail.com>:
>
>> I'm not sure if it should work without h:head actually as the default is
>> to render the JS inside head.
>>
>> Am Mo., 13. Jan. 2020 um 00:16 Uhr schrieb Vicente Rossello <
>> cocorossello@gmail.com>:
>>
>>> Hi,
>>>
>>> I found another difference between 2.3.6 and 2.3-next-M1, not sure if
>>> it's a bug, but it can impact some users.
>>>
>>> I have a custom headRenderer to inject resources:
>>>
>>> @ResourceDependency(library = "javax.faces", name = "jsf.js")
>>> public class HeadRenderer extends Renderer {
>>>
>>> ...
>>>
>>> }
>>>
>>>
>>> And then a simple page with a commandlink:
>>>
>>> <f:view contentType="text/html">
>>> <h:body role="document">
>>> hello
>>> <h:form>
>>> <h:commandLink >This link throws js exception in 2.3</h:commandLink>
>>> </h:form>
>>> </h:body>
>>>
>>> </f:view>
>>>
>>>
>>> (notice there is no <head> element)
>>>
>>>
>>> This works in 2.3.6 but throws a js exception in 2.3-next because jsf.js has not been loaded.
>>>
>>> A simple workaround is to declare an empty <head> element
>>>
>>> I have set up an example in https://github.com/cocorossello/tomee-example
>>>
>>>
>>> (The custom renderer does not make a difference anyway, but the example has it)
>>>
>>>
>>>
>>>
>>>
Re: Myfaces 2.3-next-M1
Posted by Thomas Andraschko <an...@gmail.com>.
Also note that we don't had an unittest regarding this, so it may a "magic"
feature of older versions.
However, i will invest 5 minutes why it worked before ;)
Am Mo., 13. Jan. 2020 um 09:08 Uhr schrieb Thomas Andraschko <
andraschko.thomas@gmail.com>:
> I'm not sure if it should work without h:head actually as the default is
> to render the JS inside head.
>
> Am Mo., 13. Jan. 2020 um 00:16 Uhr schrieb Vicente Rossello <
> cocorossello@gmail.com>:
>
>> Hi,
>>
>> I found another difference between 2.3.6 and 2.3-next-M1, not sure if
>> it's a bug, but it can impact some users.
>>
>> I have a custom headRenderer to inject resources:
>>
>> @ResourceDependency(library = "javax.faces", name = "jsf.js")
>> public class HeadRenderer extends Renderer {
>>
>> ...
>>
>> }
>>
>>
>> And then a simple page with a commandlink:
>>
>> <f:view contentType="text/html">
>> <h:body role="document">
>> hello
>> <h:form>
>> <h:commandLink >This link throws js exception in 2.3</h:commandLink>
>> </h:form>
>> </h:body>
>>
>> </f:view>
>>
>>
>> (notice there is no <head> element)
>>
>>
>> This works in 2.3.6 but throws a js exception in 2.3-next because jsf.js has not been loaded.
>>
>> A simple workaround is to declare an empty <head> element
>>
>> I have set up an example in https://github.com/cocorossello/tomee-example
>>
>>
>> (The custom renderer does not make a difference anyway, but the example has it)
>>
>>
>>
>>
>>
Re: Myfaces 2.3-next-M1
Posted by Thomas Andraschko <an...@gmail.com>.
I'm not sure if it should work without h:head actually as the default is to
render the JS inside head.
Am Mo., 13. Jan. 2020 um 00:16 Uhr schrieb Vicente Rossello <
cocorossello@gmail.com>:
> Hi,
>
> I found another difference between 2.3.6 and 2.3-next-M1, not sure if it's
> a bug, but it can impact some users.
>
> I have a custom headRenderer to inject resources:
>
> @ResourceDependency(library = "javax.faces", name = "jsf.js")
> public class HeadRenderer extends Renderer {
>
> ...
>
> }
>
>
> And then a simple page with a commandlink:
>
> <f:view contentType="text/html">
> <h:body role="document">
> hello
> <h:form>
> <h:commandLink >This link throws js exception in 2.3</h:commandLink>
> </h:form>
> </h:body>
>
> </f:view>
>
>
> (notice there is no <head> element)
>
>
> This works in 2.3.6 but throws a js exception in 2.3-next because jsf.js has not been loaded.
>
> A simple workaround is to declare an empty <head> element
>
> I have set up an example in https://github.com/cocorossello/tomee-example
>
>
> (The custom renderer does not make a difference anyway, but the example has it)
>
>
>
>
>