-
1. Re: First click is ignored in Richfaces with component "a4j:commandButton"
mechtatel Aug 20, 2013 12:49 PM (in response to cohencyr4)Do you have multiples forms in the view?
-
3. Re: First click is ignored in Richfaces with component "a4j:commandButton"
cohencyr4 Aug 21, 2013 4:08 AM (in response to mechtatel)Yes, I have 3 forms, and also in some "rich:popupPanel".
Of course I don't have a form inside another form.
Is it a problem to have more than one form in a page?
-
4. Re: First click is ignored in Richfaces with component "a4j:commandButton"
cohencyr4 Aug 21, 2013 4:40 AM (in response to lfryc)I tried to debug the request lifecycle, but I don't understand the logs.
In firebug, I found a difference between the click which is doing nothing (the first click) and the click which is working (the second click).
1. In the first click there is an ajax POST request with some parameters
2. In the second click there is the same ajax POST request with the same parameters with another parameter javax.faces.ViewState=2243378545953861374%3A-3303155322712103760
I don't know what the parameter "javax.faces.ViewState" means, but if this parameter is sent, the button is working.
Thx
-
5. Re: First click is ignored in Richfaces with component "a4j:commandButton"
cohencyr4 Aug 21, 2013 4:45 AM (in response to cohencyr4)Here are the full parameters for the first click (which is not working):
AJAX:EVENTS_COUNT 1
javax.faces.behavior.even... selectitem
javax.faces.partial.ajax true
javax.faces.partial.event selectitem
javax.faces.partial.execu... representativefilterform:selectbu @component
javax.faces.partial.rende... @component
javax.faces.source representativefilterform:selectbu
org.richfaces.ajax.compon... representativefilterform:selectbu
representativefilterform representativefilterform
representativefilterform:... 29
representativefilterform:... sale3 sale3
rfExt null
Here are the parameters for the second click (which is working), we can see the parameter "javax.faces.ViewState":
AJAX:EVENTS_COUNT 1
javax.faces.ViewState 2243378545953861374:-3303155322712103760
javax.faces.behavior.even... selectitem
javax.faces.partial.ajax true
javax.faces.partial.event selectitem
javax.faces.partial.execu... representativefilterform:selectbu @component
javax.faces.partial.rende... @component
javax.faces.source representativefilterform:selectbu
org.richfaces.ajax.compon... representativefilterform:selectbu
representativefilterform representativefilterform
representativefilterform:... 29
representativefilterform:... sale3 sale3
rfExt null
-
6. Re: First click is ignored in Richfaces with component "a4j:commandButton"
lfryc Aug 21, 2013 6:49 AM (in response to cohencyr4)FacesServlet won't accept any postback request which doesn't have javax.faces.ViewState parameter.
Seems the request comes from the <form> which doesn't have <input type="hidden" name="javax.faces.ViewState" value="..." /> at all.
Could you verify that?
* are you able to see the <form> without ViewState after initial request (with no subsequent AJAX updates)?
* or do you need to do some AJAX manipulation which makes the form broken?
-
7. Re: First click is ignored in Richfaces with component "a4j:commandButton"
mechtatel Aug 21, 2013 3:26 PM (in response to lfryc)I think the problem is related to https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790
As a quick workaround, in the first form you can use f:ajax and in the render yo can use somethink like that render="@form :id_second_form".
For the RF team - the root of the problem is JSF, but probably can be resolved on js level.