[JBoss JIRA] (RF-13252) a4j:ajax includes jsf.js script twice
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13252?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč edited comment on RF-13252 at 1/3/14 10:21 AM:
----------------------------------------------------------
The Mojarra problem might be fixed also on our side by specifying {{jsf.js}} dependency specifically (instead of just {{ajax.reslib}} that depends on {{jsf.js}} transitively):
{code:java}
@ResourceDependencies( {
@ResourceDependency(library = "javax.faces", name = "jsf.js"),
@ResourceDependency(library = "org.richfaces", name = "ajax.reslib")
} )
public class AjaxBehaviorRenderer extends ClientBehaviorRenderer ...
{code}
This fix works because Mojarra's {{CommandLinkRenderer}} checks in {{renderJsfJs}} method whether the page depends on {{jsf.js}}, but it depends on {{ajax.reslib}} instead.
----
This problem can be fixed by RF-13314 where we deprecate use of {{*.reslib}}.
----
Another solution would be marking all resources rendered by ResourceLibraryRenderer as rendered:
https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
was (Author: lfryc):
The Mojarra problem might be fixed also on our side by specifying {{jsf.js}} dependency specifically (instead of just {{ajax.reslib}} that depends on {{jsf.js}} transitively):
{code:java}
@ResourceDependencies( {
@ResourceDependency(library = "javax.faces", name = "jsf.js"),
@ResourceDependency(library = "org.richfaces", name = "ajax.reslib")
} )
public class AjaxBehaviorRenderer extends ClientBehaviorRenderer ...
{code}
This fix works because Mojarra's {{CommandLinkRenderer}} checks in {{renderJsfJs}} method whether the page depends on {{jsf.js}}, but it depends on {{ajax.reslib}} instead.
----
This problem can be fixed by RF-13314 where we deprecate used of {{*.reslib}}.
> a4j:ajax includes jsf.js script twice
> -------------------------------------
>
> Key: RF-13252
> URL: https://issues.jboss.org/browse/RF-13252
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core
> Affects Versions: 4.3.4
> Environment: any browser
> EAP 6.2 (Mojarra 2.1.19)
> EAP 6.1 (Mojarra 2.1.19)
> JBoss AS 7.1.1 (Mojarra 2.1.7)
> Reporter: Jonáš Trantina
> Assignee: Lukáš Fryč
> Fix For: 4.3.5
>
> Attachments: reproducer.zip
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> When a4j:script is used in the page like so:
> {noformat}
> <h:commandLink value="Click me ">
> <a4j:ajax event="click" render="@form"/>
> </h:commandLink>
> {noformat}
> Then two script tags pointing to jsf.js are added to the page, once in the head by the inclusion of @ResourceDependency [1], and once again by Overriding the ClientBehaviorRenderer#getScript method [2,3].
> Note, that according to Brian, resolving this without introducing any functional regressions may require the resolution of RF-12270 [4].
> [1] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [2] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [3] https://github.com/jboss/mojarra/blob/2.1.21-jbossorg-1/jsf-api/src/main/...
> [4] https://issues.jboss.org/browse/RF-12270
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (RF-13252) a4j:ajax includes jsf.js script twice
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13252?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč edited comment on RF-13252 at 1/3/14 10:13 AM:
----------------------------------------------------------
The Mojarra problem might be fixed also on our side by specifying {{jsf.js}} dependency specifically (instead of just {{ajax.reslib}} that depends on {{jsf.js}} transitively):
{code:java}
@ResourceDependencies( {
@ResourceDependency(library = "javax.faces", name = "jsf.js"),
@ResourceDependency(library = "org.richfaces", name = "ajax.reslib")
} )
public class AjaxBehaviorRenderer extends ClientBehaviorRenderer ...
{code}
This fix works because Mojarra's {{CommandLinkRenderer}} checks in {{renderJsfJs}} method whether the page depends on {{jsf.js}}, but it depends on {{ajax.reslib}} instead.
----
This problem can be fixed by RF-13314 where we deprecate used of {{*.reslib}}.
was (Author: lfryc):
The Mojarra problem might be fixed also on our side by specifying {{jsf.js}} dependency specifically (instead of just {{ajax.reslib}} that depends on {{jsf.js}} transitively):
{code:java}
@ResourceDependencies( {
@ResourceDependency(library = "javax.faces", name = "jsf.js"),
@ResourceDependency(library = "org.richfaces", name = "ajax.reslib")
} )
public class AjaxBehaviorRenderer extends ClientBehaviorRenderer ...
{code}
This fix works because Mojarra's {{CommandLinkRenderer}} checks in {{renderJsfJs}} method whether the page depends on {{jsf.js}}, but it depends on {{ajax.reslib}} instead.
This problem can be fixed by RF-13314 where we deprecate used of {{*.reslib}}.
> a4j:ajax includes jsf.js script twice
> -------------------------------------
>
> Key: RF-13252
> URL: https://issues.jboss.org/browse/RF-13252
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core
> Affects Versions: 4.3.4
> Environment: any browser
> EAP 6.2 (Mojarra 2.1.19)
> EAP 6.1 (Mojarra 2.1.19)
> JBoss AS 7.1.1 (Mojarra 2.1.7)
> Reporter: Jonáš Trantina
> Assignee: Lukáš Fryč
> Fix For: 4.3.5
>
> Attachments: reproducer.zip
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> When a4j:script is used in the page like so:
> {noformat}
> <h:commandLink value="Click me ">
> <a4j:ajax event="click" render="@form"/>
> </h:commandLink>
> {noformat}
> Then two script tags pointing to jsf.js are added to the page, once in the head by the inclusion of @ResourceDependency [1], and once again by Overriding the ClientBehaviorRenderer#getScript method [2,3].
> Note, that according to Brian, resolving this without introducing any functional regressions may require the resolution of RF-12270 [4].
> [1] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [2] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [3] https://github.com/jboss/mojarra/blob/2.1.21-jbossorg-1/jsf-api/src/main/...
> [4] https://issues.jboss.org/browse/RF-12270
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (RF-13252) a4j:ajax includes jsf.js script twice
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13252?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč edited comment on RF-13252 at 1/3/14 10:12 AM:
----------------------------------------------------------
I think that Mojarra should instead use {{UIView#addComponentResource}} to add {{jsf.js}} resource, that will in turn use duplication detection in its rendering logic.
--Another solution might be specifying {{@ResourceDependency}} directly as I assume that a reason for [conditional rendering of {{jsf.js}}|https://github.com/jboss/mojarra/blob/2.1.19-jbossorg-1/jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java#L124] is optimalization in case the button is rendered (however most of the JSF apps using AJAX won't mind to refer to {{jsf.js}} anyway).-- (I noticed Mojarra also checks for inclusion of commandLink in a form).
was (Author: lfryc):
I think that Mojarra should instead use {{UIView#addComponentResource}} to add {{jsf.js}} resource, that will in turn use duplication detection in its rendering logic.
Another solution might be specifying {{@ResourceDependency}} directly as I assume that a reason for [conditional rendering of {{jsf.js}}|https://github.com/jboss/mojarra/blob/2.1.19-jbossorg-1/jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java#L124] is optimalization in case the button is rendered (however most of the JSF apps using AJAX won't mind to refer to {{jsf.js}} anyway).
> a4j:ajax includes jsf.js script twice
> -------------------------------------
>
> Key: RF-13252
> URL: https://issues.jboss.org/browse/RF-13252
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core
> Affects Versions: 4.3.4
> Environment: any browser
> EAP 6.2 (Mojarra 2.1.19)
> EAP 6.1 (Mojarra 2.1.19)
> JBoss AS 7.1.1 (Mojarra 2.1.7)
> Reporter: Jonáš Trantina
> Assignee: Lukáš Fryč
> Fix For: 4.3.5
>
> Attachments: reproducer.zip
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> When a4j:script is used in the page like so:
> {noformat}
> <h:commandLink value="Click me ">
> <a4j:ajax event="click" render="@form"/>
> </h:commandLink>
> {noformat}
> Then two script tags pointing to jsf.js are added to the page, once in the head by the inclusion of @ResourceDependency [1], and once again by Overriding the ClientBehaviorRenderer#getScript method [2,3].
> Note, that according to Brian, resolving this without introducing any functional regressions may require the resolution of RF-12270 [4].
> [1] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [2] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [3] https://github.com/jboss/mojarra/blob/2.1.21-jbossorg-1/jsf-api/src/main/...
> [4] https://issues.jboss.org/browse/RF-12270
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (RF-13252) a4j:ajax includes jsf.js script twice
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13252?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč edited comment on RF-13252 at 1/3/14 10:10 AM:
----------------------------------------------------------
The Mojarra problem might be fixed also on our side by specifying {{jsf.js}} dependency specifically (instead of just {{ajax.reslib}} that depends on {{jsf.js}} transitively):
{code:java}
@ResourceDependencies( {
@ResourceDependency(library = "javax.faces", name = "jsf.js"),
@ResourceDependency(library = "org.richfaces", name = "ajax.reslib")
} )
public class AjaxBehaviorRenderer extends ClientBehaviorRenderer ...
{code}
This fix works because Mojarra's {{CommandLinkRenderer}} checks in {{renderJsfJs}} method whether the page depends on {{jsf.js}}, but it depends on {{ajax.reslib}} instead.
This problem can be fixed by RF-13314 where we deprecate used of {{*.reslib}}.
was (Author: lfryc):
The Mojarra problem might be fixed also on our side by specifying {{jsf.js}} dependency specifically (instead of just {{ajax.reslib}} that depends on {{jsf.js}} transitively):
{code:java}
@ResourceDependencies( {
@ResourceDependency(library = "javax.faces", name = "jsf.js"),
@ResourceDependency(library = "org.richfaces", name = "ajax.reslib")
} )
public class AjaxBehaviorRenderer extends ClientBehaviorRenderer ...
{code}
This problem can be fixed by RF-13314 where we deprecate used of {{*.reslib}}.
> a4j:ajax includes jsf.js script twice
> -------------------------------------
>
> Key: RF-13252
> URL: https://issues.jboss.org/browse/RF-13252
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core
> Affects Versions: 4.3.4
> Environment: any browser
> EAP 6.2 (Mojarra 2.1.19)
> EAP 6.1 (Mojarra 2.1.19)
> JBoss AS 7.1.1 (Mojarra 2.1.7)
> Reporter: Jonáš Trantina
> Assignee: Lukáš Fryč
> Fix For: 4.3.5
>
> Attachments: reproducer.zip
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> When a4j:script is used in the page like so:
> {noformat}
> <h:commandLink value="Click me ">
> <a4j:ajax event="click" render="@form"/>
> </h:commandLink>
> {noformat}
> Then two script tags pointing to jsf.js are added to the page, once in the head by the inclusion of @ResourceDependency [1], and once again by Overriding the ClientBehaviorRenderer#getScript method [2,3].
> Note, that according to Brian, resolving this without introducing any functional regressions may require the resolution of RF-12270 [4].
> [1] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [2] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [3] https://github.com/jboss/mojarra/blob/2.1.21-jbossorg-1/jsf-api/src/main/...
> [4] https://issues.jboss.org/browse/RF-12270
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (RF-13252) a4j:ajax includes jsf.js script twice
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13252?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč edited comment on RF-13252 at 1/3/14 10:07 AM:
----------------------------------------------------------
The Mojarra problem might be fixed also on our side by specifying {{jsf.js}} dependency specifically (instead of just {{ajax.reslib}} that depends on {{jsf.js}} transitively):
{code:java}
@ResourceDependencies( {
@ResourceDependency(library = "javax.faces", name = "jsf.js"),
@ResourceDependency(library = "org.richfaces", name = "ajax.reslib")
} )
public class AjaxBehaviorRenderer extends ClientBehaviorRenderer ...
{code}
This problem can be fixed by RF-13314 where we deprecate used of {{*.reslib}}.
was (Author: lfryc):
The Mojarra problem might be fixed also on our side by specifying {{jsf.js}} dependency specifically (instead of just {{ajax.reslib}} that depends on {{jsf.js}} transitively):
{code:java}
@ResourceDependencies( {
@ResourceDependency(library = "javax.faces", name = "jsf.js"),
@ResourceDependency(library = "org.richfaces", name = "ajax.reslib")
} )
public class AjaxBehaviorRenderer extends ClientBehaviorRenderer ...
{code}
> a4j:ajax includes jsf.js script twice
> -------------------------------------
>
> Key: RF-13252
> URL: https://issues.jboss.org/browse/RF-13252
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core
> Affects Versions: 4.3.4
> Environment: any browser
> EAP 6.2 (Mojarra 2.1.19)
> EAP 6.1 (Mojarra 2.1.19)
> JBoss AS 7.1.1 (Mojarra 2.1.7)
> Reporter: Jonáš Trantina
> Assignee: Lukáš Fryč
> Fix For: 4.3.5
>
> Attachments: reproducer.zip
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> When a4j:script is used in the page like so:
> {noformat}
> <h:commandLink value="Click me ">
> <a4j:ajax event="click" render="@form"/>
> </h:commandLink>
> {noformat}
> Then two script tags pointing to jsf.js are added to the page, once in the head by the inclusion of @ResourceDependency [1], and once again by Overriding the ClientBehaviorRenderer#getScript method [2,3].
> Note, that according to Brian, resolving this without introducing any functional regressions may require the resolution of RF-12270 [4].
> [1] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [2] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [3] https://github.com/jboss/mojarra/blob/2.1.21-jbossorg-1/jsf-api/src/main/...
> [4] https://issues.jboss.org/browse/RF-12270
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (RF-13252) a4j:ajax includes jsf.js script twice
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13252?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on RF-13252:
---------------------------------
The Mojarra problem might be fixed also on our side by specifying {{jsf.js}} dependency specifically (instead of just {{ajax.reslib}} that depends on {{jsf.js}} transitively):
{code:java}
@ResourceDependencies( {
@ResourceDependency(library = "javax.faces", name = "jsf.js"),
@ResourceDependency(library = "org.richfaces", name = "ajax.reslib")
} )
public class AjaxBehaviorRenderer extends ClientBehaviorRenderer ...
{code}
> a4j:ajax includes jsf.js script twice
> -------------------------------------
>
> Key: RF-13252
> URL: https://issues.jboss.org/browse/RF-13252
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core
> Affects Versions: 4.3.4
> Environment: any browser
> EAP 6.2 (Mojarra 2.1.19)
> EAP 6.1 (Mojarra 2.1.19)
> JBoss AS 7.1.1 (Mojarra 2.1.7)
> Reporter: Jonáš Trantina
> Assignee: Lukáš Fryč
> Fix For: 4.3.5
>
> Attachments: reproducer.zip
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> When a4j:script is used in the page like so:
> {noformat}
> <h:commandLink value="Click me ">
> <a4j:ajax event="click" render="@form"/>
> </h:commandLink>
> {noformat}
> Then two script tags pointing to jsf.js are added to the page, once in the head by the inclusion of @ResourceDependency [1], and once again by Overriding the ClientBehaviorRenderer#getScript method [2,3].
> Note, that according to Brian, resolving this without introducing any functional regressions may require the resolution of RF-12270 [4].
> [1] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [2] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [3] https://github.com/jboss/mojarra/blob/2.1.21-jbossorg-1/jsf-api/src/main/...
> [4] https://issues.jboss.org/browse/RF-12270
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (RF-13042) Render h:commandlink: keeps reloading js
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13042?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on RF-13042:
---------------------------------
A workaround is using {{<r:commandLink />}} instead of {{<h:commandLink />}}.
> Render h:commandlink: keeps reloading js
> ----------------------------------------
>
> Key: RF-13042
> URL: https://issues.jboss.org/browse/RF-13042
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.2.3.Final, 4.3.2
> Reporter: Nicolas Daniels
> Fix For: 5.0.0.Alpha3
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> Javascript resource is reloaded at each render, and so javascript was becoming heavier and heavier to run (to end by a not responsive alter on FF -or even FF hangs forever).
>
> After more investigation, I noticed it is due to the h:commandlink tag which was inside my rerendered part.
> Workaround:
> Add:
> {code:xml}
> <h:inputText rendered="false">
> <f:ajax />
> </h:inputText>
> {code}
> in your page, Js is not reloading anymore. (I inserted it at the end but I guess it works anywhere)
> See forum link for more details.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months
[JBoss JIRA] (RF-13252) a4j:ajax includes jsf.js script twice
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13252?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč edited comment on RF-13252 at 1/3/14 9:42 AM:
---------------------------------------------------------
I think that Mojarra should instead use {{UIView#addComponentResource}} to add {{jsf.js}} resource, that will in turn use duplication detection in its rendering logic.
Another solution might be specifying {{@ResourceDependency}} directly as I assume that a reason for [conditional rendering of {{jsf.js}}|https://github.com/jboss/mojarra/blob/2.1.19-jbossorg-1/jsf-ri/src/main/java/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java#L124] is optimalization in case the button is rendered (however most of the JSF apps using AJAX won't mind to refer to {{jsf.js}} anyway).
was (Author: lfryc):
I think that Mojarra should instead use {{UIView#addComponentResource}} to add {{jsf.js}} resource, that will in turn use duplication detection in its rendering logic.
Another solution might be specifying {{@ResourceDependency}} directly as I assume that a reason for conditional rendering of {{jsf.js}} is optimalization in case the button is rendered (however most of the JSF apps using AJAX won't mind to refer to {{jsf.js}} anyway).
> a4j:ajax includes jsf.js script twice
> -------------------------------------
>
> Key: RF-13252
> URL: https://issues.jboss.org/browse/RF-13252
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core
> Affects Versions: 4.3.4
> Reporter: Jonáš Trantina
> Assignee: Lukáš Fryč
> Fix For: 4.3.5
>
> Attachments: reproducer.zip
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> When a4j:script is used in the page like so:
> {noformat}
> <h:commandLink value="Click me ">
> <a4j:ajax event="click" render="@form"/>
> </h:commandLink>
> {noformat}
> Then two script tags pointing to jsf.js are added to the page, once in the head by the inclusion of @ResourceDependency [1], and once again by Overriding the ClientBehaviorRenderer#getScript method [2,3].
> Note, that according to Brian, resolving this without introducing any functional regressions may require the resolution of RF-12270 [4].
> [1] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [2] https://github.com/richfaces/richfaces/blob/master/framework/src/main/jav...
> [3] https://github.com/jboss/mojarra/blob/2.1.21-jbossorg-1/jsf-api/src/main/...
> [4] https://issues.jboss.org/browse/RF-12270
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 11 months