[richfaces-issues] [JBoss JIRA] (RF-12543) a4j:push after ajax-rendered does not have its javascript included
Marc-Christian Schroeer (JIRA)
jira-events at lists.jboss.org
Tue Feb 19 12:40:56 EST 2013
[ https://issues.jboss.org/browse/RF-12543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12755157#comment-12755157 ]
Marc-Christian Schroeer commented on RF-12543:
----------------------------------------------
Thanks Lukáš for the answer. Though this is not the right place I'd like to elaborate on my problem:
<a4j:repeat var="unit" ...>
<a4j:push topic="#{unit.id}">
<a4j:ajax event="dataavailable" render="unit"/>
</a4j:push>
<a4j:outputPanel id="unit">
... stuff ...
</a4j:outputPanel>
</a4j:repeat>
This setup works great and I can send push messages to all clients updating a specific outputPanel. Now comes the "but": once due to a structural change I have to rerender the complete list, the whole push mechanism stops working for some time. Because of this setup I cannot move the a4j:push-tags outside of the loop.
When will release 5 be available in some repo?
> a4j:push after ajax-rendered does not have its javascript included
> ------------------------------------------------------------------
>
> Key: RF-12543
> URL: https://issues.jboss.org/browse/RF-12543
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Environment: RichFaces 4.2.2 FINAL
> Reporter: nimo stephan
> Fix For: 5-Tracking
>
>
> I have a4j:push within my page which should be rendered only if the property "pushIsActivated" is true. When changing the property by a button to true, then I want to make a ajax-rendering which renders the a4j:push. However, the javascript portion is not created within the aj4:push, hence the component does not work! I have to make a full page refresh, then the javascript portion is inserted and a4j:push works as expected. However, I have to do a full page refresh. I guess, it is a bug, because the a4j:push has a rendered-property which can be changed by ajax, hence it has to work after ajax-update.
> {code}
> <h:form id="my-form" prependId="false" style="display:none;">
> <a4j:push rendered="#{mybean.pushIsActivated}" address=".." onerror=".." ondataavailable="..">
> <a4j:ajax event="dataavailable" render="my-section"/>
> </a4j:push>
> </h:form>
> {code}
> If I only render my-form after changing the property, a4j:push does not work:
> {code}
> <h:form>
> <h:commandButton value="Activate Push " action="#{myBean.setActivatePushToTrue}">
> <f:ajax render=":my-form"/>
> </h:commandButton>
> </h:form>
> {code}
> I have to do a full page refresh, only then aj4:push works:
> {code}
> <h:form>
> <h:commandButton value="Activate Push " action="#{myBean.setPushActivateToTrue}" onclick="submit();" />
> </h:form>
> {code}
> Richfaces does insert the needed javascript only after a full page request:
> {code}
> <script type="text/javascript">RichFaces.Push.setPushResourceUrl.....;</script>
> {code}
> If I make a ajax-rendering, Richfaces does NOT (!) insert the needed javascript. Hence a4j:push does not work.
--
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