[richfaces-issues] [JBoss JIRA] (RF-13252) a4j:ajax includes jsf.js script twice

Lukáš Fryč (JIRA) issues at jboss.org
Mon Jan 6 11:19:33 EST 2014


    [ https://issues.jboss.org/browse/RF-13252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12933802#comment-12933802 ] 

Lukáš Fryč edited comment on RF-13252 at 1/6/14 11:19 AM:
----------------------------------------------------------

I have implemented the fix on a [feature branch|https://github.com/richfaces/richfaces/commit/dc1203477c2081ec2a78d2f6281d74b89f3a8f3d].

The fix involves creating of new {{queue.reslib}} resource library (needed for conditional rendering of {{richfaces-queue.js}} as {{@ResourceDependency}} itself doesn't have any concept of conditional rendering. See the commit.
                
      was (Author: lfryc):
    I have implemented the fix on a [feature branch|https://github.com/richfaces/richfaces/commit/dc1203477c2081ec2a78d2f6281d74b89f3a8f3d].

The fix involves creating of new {{queue.reslib}} resource library (needed for conditional rendering of {{richfaces-queue.js}} as {{@ResourceDependency}} itself doesn't have any concept of conditional rendering. See the commit.

I feel that we should refactor also all of other {{ajax.reslib}} and {{base-component.reslib}} usages as suggested in RF-13314.
                  
> 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/java/org/richfaces/ui/ajax/ajax/AjaxBehaviorRenderer.java#L53
> [2] https://github.com/richfaces/richfaces/blob/master/framework/src/main/java/org/richfaces/ui/ajax/ajax/AjaxBehaviorRenderer.java#L123
> [3] https://github.com/jboss/mojarra/blob/2.1.21-jbossorg-1/jsf-api/src/main/java/javax/faces/render/ClientBehaviorRenderer.java#L95
> [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



More information about the richfaces-issues mailing list