[JBoss JIRA] (RF-13619) RichFaces.javascriptServiceComplete(); is not called on normal GET/POST request
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13619?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-13619:
------------------------------------
$.ready() callbacks are executed once the page is loaded, not after an AJAX update.
> RichFaces.javascriptServiceComplete(); is not called on normal GET/POST request
> -------------------------------------------------------------------------------
>
> Key: RF-13619
> URL: https://issues.jboss.org/browse/RF-13619
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: base functionality
> Affects Versions: 4.3.6
> Environment: Richfaces 4.3.6.Final, Tomcat 7.0.53, JSF 2.1.27, Java7u55
> Reporter: Wang Liyu
>
> In AJAX Response Richfaces added RichFaces.javascriptServiceComplete(); at the end of the response, the default implementation is fire a event, so if I have $.ready() want to do something on delay-constructed Richfaces Objects, this would be the place, I can call $.one('javascriptServiceComplete', functionname);
> But if the same page is called with GET/POST method (normal requestion), it won't call this method, is there any reason why is that?
> Here is the discussion on the forum:
> https://community.jboss.org/thread/240501
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (RF-13619) RichFaces.javascriptServiceComplete(); is not called on normal GET/POST request
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13619?page=com.atlassian.jira.plugin.s... ]
Brian Leathem resolved RF-13619.
--------------------------------
Resolution: Rejected
> RichFaces.javascriptServiceComplete(); is not called on normal GET/POST request
> -------------------------------------------------------------------------------
>
> Key: RF-13619
> URL: https://issues.jboss.org/browse/RF-13619
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: base functionality
> Affects Versions: 4.3.6
> Environment: Richfaces 4.3.6.Final, Tomcat 7.0.53, JSF 2.1.27, Java7u55
> Reporter: Wang Liyu
>
> In AJAX Response Richfaces added RichFaces.javascriptServiceComplete(); at the end of the response, the default implementation is fire a event, so if I have $.ready() want to do something on delay-constructed Richfaces Objects, this would be the place, I can call $.one('javascriptServiceComplete', functionname);
> But if the same page is called with GET/POST method (normal requestion), it won't call this method, is there any reason why is that?
> Here is the discussion on the forum:
> https://community.jboss.org/thread/240501
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (RF-13592) a4j:push doesn't work after rendering
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13592?page=com.atlassian.jira.plugin.s... ]
Juraj Húska closed RF-13592.
----------------------------
> a4j:push doesn't work after rendering
> -------------------------------------
>
> Key: RF-13592
> URL: https://issues.jboss.org/browse/RF-13592
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-push/poll
> Affects Versions: 4.3.5
> Environment: JBoss EAP 6.2
> Browser: Chrome 33.0.1750.154 and IE 8.0.7601.17514
> JSF 2.19, Richfaces 4.3.5
> Reporter: Igor Bolshakov
> Assignee: Brian Leathem
> Priority: Critical
> Labels: gss
> Fix For: 4.3.7
>
> Attachments: a4j.log, localhost.har, push-test.zip, push-test.zip, screenshot.png, web.xml
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> I use {{rendered}} attribute to start/stop a4j:push component in example below. After rendering of a4j:push element the handling of incoming push messages is broken. In my simple example I set alert to notify about recieved message (see attached screenshot).
> View xhtml code:
> {code:xml}<?xml version="1.0" encoding="ISO-8859-1"?>
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:ui="http://java.sun.com/jsf/facelets">
> <h:form>
> <a4j:outputPanel id="push-panel">
> <a4j:push address="TEST_ADDRESS" ondataavailable="alert('event.rf.data=' + event.rf.data)"
> rendered="#{testBean.enabled}"/>
> </a4j:outputPanel>
> <a4j:commandButton id="startBtn" value="Start Push" action="#{testBean.startPush}" render="push-panel"/>
> <a4j:commandButton id="stopBtn" value="Stop Push" action="#{testBean.stopPush}" render="push-panel"/>
> <a4j:commandButton id="sendMessage" value="Send Message" action="#{testBean.sendMessage}"/>
> </h:form>
> </ui:composition>{code}
> Backing bean class:
> {code}public class TestBean {
> private boolean enabled = false;
> public boolean isEnabled() {
> return enabled;
> }
> public void startPush() {
> enabled = true;
> }
> public void stopPush() {
> enabled = false;
> }
> public void sendMessage() throws MessageException {
> TopicsContext.lookup().publish(new TopicKey("TEST_ADDRESS"), "Hello World");
> }
> }{code}
> Configuration in web.xml (see attachment).
> Scenario:
> 1) Open page
> 2) Click "Start Push" button
> 3) Click "Send Message" button
> 4) Alert "event.rf.data=Hello World" is shown (see attached screenshot)
> 5) Click "Stop Push" button
> 6) Polling is closed (see localhost.har in attachment)
> 7) Click "Start Push" button
> 8) Polling is started (see localhost.har in attachment)
> 9) Click "Send Message" button
> 10) Message is recieved (see localhost.har in attachment)
> 11) No alert, no javascript error
> For more details I saved a4j:log output in a4j.log file.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (RF-13592) a4j:push doesn't work after rendering
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13592?page=com.atlassian.jira.plugin.s... ]
Juraj Húska updated RF-13592:
-----------------------------
Labels: gss (was: gss needs-qe)
> a4j:push doesn't work after rendering
> -------------------------------------
>
> Key: RF-13592
> URL: https://issues.jboss.org/browse/RF-13592
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-push/poll
> Affects Versions: 4.3.5
> Environment: JBoss EAP 6.2
> Browser: Chrome 33.0.1750.154 and IE 8.0.7601.17514
> JSF 2.19, Richfaces 4.3.5
> Reporter: Igor Bolshakov
> Assignee: Brian Leathem
> Priority: Critical
> Labels: gss
> Fix For: 4.3.7
>
> Attachments: a4j.log, localhost.har, push-test.zip, push-test.zip, screenshot.png, web.xml
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> I use {{rendered}} attribute to start/stop a4j:push component in example below. After rendering of a4j:push element the handling of incoming push messages is broken. In my simple example I set alert to notify about recieved message (see attached screenshot).
> View xhtml code:
> {code:xml}<?xml version="1.0" encoding="ISO-8859-1"?>
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:ui="http://java.sun.com/jsf/facelets">
> <h:form>
> <a4j:outputPanel id="push-panel">
> <a4j:push address="TEST_ADDRESS" ondataavailable="alert('event.rf.data=' + event.rf.data)"
> rendered="#{testBean.enabled}"/>
> </a4j:outputPanel>
> <a4j:commandButton id="startBtn" value="Start Push" action="#{testBean.startPush}" render="push-panel"/>
> <a4j:commandButton id="stopBtn" value="Stop Push" action="#{testBean.stopPush}" render="push-panel"/>
> <a4j:commandButton id="sendMessage" value="Send Message" action="#{testBean.sendMessage}"/>
> </h:form>
> </ui:composition>{code}
> Backing bean class:
> {code}public class TestBean {
> private boolean enabled = false;
> public boolean isEnabled() {
> return enabled;
> }
> public void startPush() {
> enabled = true;
> }
> public void stopPush() {
> enabled = false;
> }
> public void sendMessage() throws MessageException {
> TopicsContext.lookup().publish(new TopicKey("TEST_ADDRESS"), "Hello World");
> }
> }{code}
> Configuration in web.xml (see attachment).
> Scenario:
> 1) Open page
> 2) Click "Start Push" button
> 3) Click "Send Message" button
> 4) Alert "event.rf.data=Hello World" is shown (see attached screenshot)
> 5) Click "Stop Push" button
> 6) Polling is closed (see localhost.har in attachment)
> 7) Click "Start Push" button
> 8) Polling is started (see localhost.har in attachment)
> 9) Click "Send Message" button
> 10) Message is recieved (see localhost.har in attachment)
> 11) No alert, no javascript error
> For more details I saved a4j:log output in a4j.log file.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (RF-13592) a4j:push doesn't work after rendering
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/RF-13592?page=com.atlassian.jira.plugin.s... ]
Juraj Húska commented on RF-13592:
----------------------------------
I have verified the fix with 4.3.7-SNAPSHOT. I have tried on variety of browsers, including IE. I have checked it also for regressions, everything seems to be running just OK.
Metamer page simulating also the multipe push example can be found here:
https://github.com/richfaces/richfaces-qa/blob/master/metamer/application...
> a4j:push doesn't work after rendering
> -------------------------------------
>
> Key: RF-13592
> URL: https://issues.jboss.org/browse/RF-13592
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-push/poll
> Affects Versions: 4.3.5
> Environment: JBoss EAP 6.2
> Browser: Chrome 33.0.1750.154 and IE 8.0.7601.17514
> JSF 2.19, Richfaces 4.3.5
> Reporter: Igor Bolshakov
> Assignee: Brian Leathem
> Priority: Critical
> Labels: gss, needs-qe
> Fix For: 4.3.7
>
> Attachments: a4j.log, localhost.har, push-test.zip, push-test.zip, screenshot.png, web.xml
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> I use {{rendered}} attribute to start/stop a4j:push component in example below. After rendering of a4j:push element the handling of incoming push messages is broken. In my simple example I set alert to notify about recieved message (see attached screenshot).
> View xhtml code:
> {code:xml}<?xml version="1.0" encoding="ISO-8859-1"?>
> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
> xmlns:a4j="http://richfaces.org/a4j"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:ui="http://java.sun.com/jsf/facelets">
> <h:form>
> <a4j:outputPanel id="push-panel">
> <a4j:push address="TEST_ADDRESS" ondataavailable="alert('event.rf.data=' + event.rf.data)"
> rendered="#{testBean.enabled}"/>
> </a4j:outputPanel>
> <a4j:commandButton id="startBtn" value="Start Push" action="#{testBean.startPush}" render="push-panel"/>
> <a4j:commandButton id="stopBtn" value="Stop Push" action="#{testBean.stopPush}" render="push-panel"/>
> <a4j:commandButton id="sendMessage" value="Send Message" action="#{testBean.sendMessage}"/>
> </h:form>
> </ui:composition>{code}
> Backing bean class:
> {code}public class TestBean {
> private boolean enabled = false;
> public boolean isEnabled() {
> return enabled;
> }
> public void startPush() {
> enabled = true;
> }
> public void stopPush() {
> enabled = false;
> }
> public void sendMessage() throws MessageException {
> TopicsContext.lookup().publish(new TopicKey("TEST_ADDRESS"), "Hello World");
> }
> }{code}
> Configuration in web.xml (see attachment).
> Scenario:
> 1) Open page
> 2) Click "Start Push" button
> 3) Click "Send Message" button
> 4) Alert "event.rf.data=Hello World" is shown (see attached screenshot)
> 5) Click "Stop Push" button
> 6) Polling is closed (see localhost.har in attachment)
> 7) Click "Start Push" button
> 8) Polling is started (see localhost.har in attachment)
> 9) Click "Send Message" button
> 10) Message is recieved (see localhost.har in attachment)
> 11) No alert, no javascript error
> For more details I saved a4j:log output in a4j.log file.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (RF-13605) a4j:ajax button click event gets lost
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13605?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13605:
-------------------------------
Labels: gss waiting_on_user (was: )
> a4j:ajax button click event gets lost
> -------------------------------------
>
> Key: RF-13605
> URL: https://issues.jboss.org/browse/RF-13605
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-a4j-core
> Affects Versions: 4.3.6
> Reporter: abhishek vijra
> Labels: gss, waiting_on_user
> Attachments: queue.zip
>
>
> Clicking on the submit button of a form containing input elements with valuechange event listeners triggers only the execution of the event listeners of the corresponding input elements, but the button click event apparently gets lost and the form isn't actually being submitted. The user has to click on the button again to finally submit it. Explicitly setting the requestDelay of an associated a4j:queue to say 200ms for all events seems to preserve the click event and the form gets submitted as expected in our specific test environment. This isn't a generally acceptable workaround though, as it introduces redundant global delay and hardly preserves the click event reliably across environments with different timing constraints.
> Attached a testcase to isolate the problem, see the attached zip file containing a minimal JSF application with a simple RichFaces-enabled form which reproduces the undesired behavior.
> {code}
> <h:panelGroup id="greeting">
> <h:outputText value="Hello #{richBean.name}!" rendered="#{not empty richBean.name}" style="font-size:2em" />
> </h:panelGroup>
> <!-- <a4j:queue name="org.richfaces.queue.global" requestDelay="200" /> -->
> <h:form>
> <h:panelGrid id="panel" columns="2" border="0" cellpadding="0" cellspacing="10">
> <h:outputLabel value="Name:" for="nameInput" />
> <h:inputText id="nameInput" value="#{richBean.name}">
> <a4j:ajax event="change" listener="#{richBean.normalizeName}" render="@form" />
> </h:inputText>
> <f:facet name="footer">
> <h:panelGroup style="display:block; text-align:right">
> <a4j:commandButton id="submit" value="Submit" render="greeting" />
> </h:panelGroup>
> </f:facet>
> </h:panelGrid>
> </h:form>
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (RF-13616) PopupPanel autosize with togglePanel doesn't resize
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13616?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13616:
-------------------------------
Labels: gss (was: )
> PopupPanel autosize with togglePanel doesn't resize
> ---------------------------------------------------
>
> Key: RF-13616
> URL: https://issues.jboss.org/browse/RF-13616
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component
> Affects Versions: 4.2.3.Final, 4.3.6
> Reporter: abhishek vijra
> Labels: gss
> Attachments: popupPanel.zip
>
>
> PopupPanel doesn't autosize correctly after move. Moving a PopupPanel with 'autosized' attribute enabled causes the width properties of its inner container div, content div, srcoller div, and shadow div to be hard-set such that a subsequent content change doesn't trigger the auto-resize of the PopupPanel any longer. The PopupPanel height is apparently unaffected.
> Attached is a testcase to demonstrate the problem, see the attached zip file containing a minimal JSF application which reproduces the undesired behavior.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (RF-13615) ExtendedDataTable: double ajax request on scrolling
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13615?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13615:
-------------------------------
Assignee: Michal Petrov
> ExtendedDataTable: double ajax request on scrolling
> ---------------------------------------------------
>
> Key: RF-13615
> URL: https://issues.jboss.org/browse/RF-13615
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: showcase
> Affects Versions: 4.3.6
> Environment: Problem can be tested in richfaces showcase.
> http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=extende...
> Reporter: Holger Walter
> Assignee: Michal Petrov
> Fix For: 4.3.8
>
> Attachments: edt.png
>
>
> 1. Go to the extendedDataTable showcase
> 2. Turn on ajax loading.
> 3. Open the debugger of your browser and watch the network communication
> 4. Scroll down in the table untli new data has to be fetched.
> => one POST request is sent. This is fine.
> 5. Change the width of a column in the table.
> => one POST request is sent. This is fine.
> 6. Scroll again in the table untli new data has to be fetched.
> -> 2 POST requests are sent. WHY?
> From now on, on each scroll, the table always sends 2 requests. This behavior stops only when your relaod the table.
> Due to this behavior I get some perfromance issues, as I have to execute some own javascript after each request.
> Is there a possibility to prevent the 2nd POST request. I would be happy even with a dirty hack, or just a hint showing me from where the 2nd request is triggered.
> Best regards
> wlh
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months
[JBoss JIRA] (RF-13616) PopupPanel autosize with togglePanel doesn't resize
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13616?page=com.atlassian.jira.plugin.s... ]
Brian Leathem updated RF-13616:
-------------------------------
Steps to Reproduce:
1. Without moving the PopupPanel directly switch to Panel Item 2.
2. The PopupPanel is autosized as expected, correctly adjusting to the size difference between its previous and its current content. Now switch back to Panel Item 1.
3. Move the PopupPanel around and then switch back to Panel Item 2.
4. Notice that the PopupPanel isn't properly autosized anymore but is now stuck to the smaller width of Panel Item 1.
Switching to Panel Item 2 will autosize the PopupPanel properly if and only if it hasn't been moved yet. Looking into the PopupPanel source code we found that while initially moving the PopupPanel, the width of the currently active Panel Item is hard-set on said divs in the PopupPanel RichFaces.ui.PopupPanel.prototype.doResizeOrMove method which prevents all further autosizing on move.
A possible workaround:- which overrides the original doResizeOrMove method on the RichFaces.ui.PopupPanel prototype and simply undoes the modifications of the previously undefined CSS widths properties on the relevant divs if the PopupPanel autosized attribute is enabled--can be activated by uncommenting the following code in /main/webapp/resources/js/patch-popup-panel.js:
{code}
/*
(function() {
var richfacesUiPopupPanelDoResizeOrMove = RichFaces.ui.PopupPanel.prototype.doResizeOrMove;
RichFaces.ui.PopupPanel.prototype.doResizeOrMove = function(diff) {
var ret = richfacesUiPopupPanelDoResizeOrMove.call(this, diff);
if (this.options.autosized) {
this.cdiv.css("width", "");
this.contentDiv.css("width", "");
this.scrollerDiv.css("width", "");
this.shadowDiv.css("width", "");
}
return ret;
};
}());
*/
{code}
was:
1. Without moving the PopupPanel directly switch to Panel Item 2.
2. The PopupPanel is autosized as expected, correctly adjusting to the size difference between its previous and its current content. Now switch back to Panel Item 1.
3. Move the PopupPanel around and then switch back to Panel Item 2.
4. Notice that the PopupPanel isn't properly autosized anymore but is now stuck to the smaller width of Panel Item 1.
Switching to Panel Item 2 will autosize the PopupPanel properly if and only if it hasn't been moved yet. Looking into the PopupPanel source code we found that while initially moving the PopupPanel, the width of the currently active Panel Item is hard-set on said divs in the PopupPanel RichFaces.ui.PopupPanel.prototype.doResizeOrMove method which prevents all further autosizing on move.
A possible workaround:- which overrides the original doResizeOrMove method on the RichFaces.ui.PopupPanel prototype and simply undoes the modifications of the previously undefined CSS widths properties on the relevant divs if the PopupPanel autosized attribute is enabled--can be activated by uncommenting the following code in /main/webapp/resources/js/patch-popup-panel.js:
/*
(function() {
var richfacesUiPopupPanelDoResizeOrMove = RichFaces.ui.PopupPanel.prototype.doResizeOrMove;
RichFaces.ui.PopupPanel.prototype.doResizeOrMove = function(diff) {
var ret = richfacesUiPopupPanelDoResizeOrMove.call(this, diff);
if (this.options.autosized) {
this.cdiv.css("width", "");
this.contentDiv.css("width", "");
this.scrollerDiv.css("width", "");
this.shadowDiv.css("width", "");
}
return ret;
};
}());
*/
> PopupPanel autosize with togglePanel doesn't resize
> ---------------------------------------------------
>
> Key: RF-13616
> URL: https://issues.jboss.org/browse/RF-13616
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component
> Affects Versions: 4.2.3.Final, 4.3.6
> Reporter: abhishek vijra
> Attachments: popupPanel.zip
>
>
> PopupPanel doesn't autosize correctly after move. Moving a PopupPanel with 'autosized' attribute enabled causes the width properties of its inner container div, content div, srcoller div, and shadow div to be hard-set such that a subsequent content change doesn't trigger the auto-resize of the PopupPanel any longer. The PopupPanel height is apparently unaffected.
> Attached is a testcase to demonstrate the problem, see the attached zip file containing a minimal JSF application which reproduces the undesired behavior.
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)
10 years, 7 months