-
1. Re: render h:commandlink: keeps reloading js
multanis Feb 8, 2013 4:18 AM (in response to multanis)Actually, this problem is even more annoying than expected because I cannot replace all my h:commandlink by a4j:commandlink:
1. a4j:commandlink has no 'target' attribute
2.My h:commandlink is used to download file, which doesn't work with a4j:commandlink
Any idea on how to fix this (This is slowing down most of my pages) ?
-
2. Re: render h:commandlink: keeps reloading js
multanis May 30, 2013 3:45 AM (in response to multanis)Hi,
I just tried with new RichFaces version 4.3.2.Final (and so JSF 2.1.19-jbossorg-1) with exactly the same behaviour :-(
Nobody else has the same problem ?
This is really annoying, any workarround will be more than welcome !
Thanks !
-
3. Re: render h:commandlink: keeps reloading js
multanis May 30, 2013 4:37 AM (in response to multanis)Some more info:
- Using a <f:ajax> to perform the render is not causing the problem
- Weirder: If I've a <f:ajax> and a <a4j:commandLink> in my page, the <a4j:commandLink> is not causing the issue anymore
- <a4j:commandLink> without <f:ajax> is still causing reloading of js
So it seems to be linked to rich faces, and not jsf.
Code:
Case 1: No problem
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" xmlns:f="http://java.sun.com/jsf/core"> <h:head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <h:outputScript name="jquery.js"/> <title>Test Face</title> </h:head> <h:body> <h:form prependId="false"> <h:commandLink immediate="true" title="action" value="hlink"> <f:ajax event="click" render="content"/> </h:commandLink> <br/> <h:panelGroup id="content"> <h:commandLink immediate="true" title="action" > <h:outputText value="edit" /> </h:commandLink> </h:panelGroup> </h:form> </h:body> </html>
Case 2: No problem
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" xmlns:f="http://java.sun.com/jsf/core"> <h:head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <h:outputScript name="jquery.js"/> <title>Test Face</title> </h:head> <h:body> <h:form prependId="false"> <a4j:commandLink value="a4jlink" render="content" /> <br/> <h:commandLink immediate="true" title="action" value="hlink"> <f:ajax event="click" render="content"/> </h:commandLink> <br/> <h:panelGroup id="content"> <h:commandLink immediate="true" title="action" > <h:outputText value="edit" /> </h:commandLink> </h:panelGroup> </h:form> </h:body> </html>
Case 3: PROBLEM !
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" xmlns:f="http://java.sun.com/jsf/core"> <h:head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <h:outputScript name="jquery.js"/> <title>Test Face</title> </h:head> <h:body> <h:form prependId="false"> <a4j:commandLink value="a4jlink" render="content" /> <br/> <h:panelGroup id="content"> <h:commandLink immediate="true" title="action" > <h:outputText value="edit" /> </h:commandLink> </h:panelGroup> </h:form> </h:body> </html>
-
4. Re: render h:commandlink: keeps reloading js
multanis May 30, 2013 5:48 AM (in response to multanis)Ok, so I found a nice workarround:
Adding in all my pages:
<h:inputText rendered="false"> <f:ajax /> </h:inputText>
This fixes the problem.
However it still sounds like a bug to me, I will add an incident about that
EDIT:
Bug added: