-
1. Re: RF5: ajax request oncomplete issue
lfryc Aug 20, 2013 2:47 PM (in response to mechtatel)Hey H G, :-)
could you share with us a javascript stack trace of a enableButton invocation?
I guess it might be richfaces.js bug.
-
2. Re: RF5: ajax request oncomplete issue
mechtatel Aug 21, 2013 4:19 PM (in response to lfryc)Of course Lukáš,
RichFaces: New request added to queue. Queue requestGroupingId changed to cmdbX
log.js...chfaces (línea 175)
RichFaces: Queue will wait 0ms before submit
log.js...chfaces (línea 175)
RichFaces: richfaces.queue: will submit request NOW
log.js...chfaces (línea 175)
RichFaces: Received 'begin' event from <a id=cmdbX ...>
log.js...chfaces (línea 175)
POST http://localhost:8080/portal/register.jsf
200 OK
96ms
jsf.js...lopment (línea 1812)
RichFaces: Received 'beforedomupdate' event from <a id=cmdbX ...>
log.js...chfaces (línea 175)
RichFaces: [object Object]
log.js...chfaces (línea 175)
RichFaces: [object Object]
RichFaces: richfaces.queue: ajax submit error
log.js...chfaces (línea 175)
RichFaces: richfaces.queue: Nothing to submit
log.js...chfaces (línea 175)
RichFaces: Received 'error@malformedXML' event from <a id=cmdbX ...>
_log()log.js...chfaces (línea 175)
level =
"error"
message =
"Received 'error@malform...btn-default btn-lg ...>"
(?)()log.js...chfaces (línea 262)
message =
"Received 'error@malform...btn-default btn-lg ...>"
error()richfaces.js.jsf (línea 291)
text =
"Received 'error@malform...btn-default btn-lg ...>"
jsfAjaxLogAdapter()log.js...chfaces (línea 354)
data = Object { type=
"error"
, status=
"malformedXML"
, source=a#cmdbX.btn, más...}
(?)()richfaces.js.jsf (línea 478)
eventData = Object { type=
"error"
, status=
"malformedXML"
, source=a#cmdbX.btn, más...}
sendError()jsf.js...lopment (línea 1883)
request = XMLHttpRequest { readyState=
4
, timeout=
0
, withCredentials=
false
, más...}
context = Object { element=a#cmdbX.btn, form=form#formTypeUser, formid=
"formTypeUser"
, más...}
status =
"malformedXML"
description =
"During update: javax.faces.ViewState not found"
serverErrorName =
undefined
serverErrorMessage =
undefined
response()jsf.js...lopment (línea 2751)
request =
undefined
context =
undefined
response()richfaces.js.jsf (línea 678)
request = XMLHttpRequest { readyState=
4
, timeout=
0
, withCredentials=
false
, más...}
context = Object { element=a#cmdbX.btn, form=form#formTypeUser, formid=
"formTypeUser"
, más...}
response()richfa....js.jsf (línea 443)
request = XMLHttpRequest { readyState=
4
, timeout=
0
, withCredentials=
false
, más...}
context = Object { element=a#cmdbX.btn, form=form#formTypeUser, formid=
"formTypeUser"
, más...}
response()richfa....js.jsf (línea 72)
request = XMLHttpRequest { readyState=
4
, timeout=
0
, withCredentials=
false
, más...}
context = Object { element=a#cmdbX.btn, form=form#formTypeUser, formid=
"formTypeUser"
, más...}
onComplete()jsf.js...lopment (línea 1705)
onreadystatechange()
console[level](logMsg);
log.js...chfaces (línea 175)
RichFaces: [200] During update: javax.faces.ViewState not found
console[level](logMsg);
log.js...chfaces (línea 175)
RichFaces: Received 'complete' event from <a id=cmdbX ...>
This is the code on enableButton:
function enableButton(object) {
try{
object.removeAttribute('disabled');
}catch(err){alert(err.message);}
}
The alert is rising: object.removeAttribute is not a function
If I use #{r:clientId('cmdbX')} instead of 'this' is working fine, but 'this' is much more better
javax.faces.ViewState not found is maybe related to https://community.jboss.org/message/833433#833433
-
3. Re: RF5: ajax request oncomplete issue
bleathem Aug 23, 2013 1:50 PM (in response to mechtatel)Can you include your javascript function definitions to better understand what you are trying to achieve?
-
4. Re: RF5: ajax request oncomplete issue
mechtatel Aug 23, 2013 4:54 PM (in response to bleathem)Hi Brian,
function enableButton(object) {
try{
object.removeAttribute('disabled');
}catch(err){alert(err.message);}
}
-
5. Re: RF5: ajax request oncomplete issue
bleathem Aug 23, 2013 4:57 PM (in response to mechtatel)Great, that helps. Next:
but the parameter this is not passed correctly. The onbegin is working fine.
When you say "not passed correctly", what do you mean? It's null? it's the wrong object? is so, what object is it?
-
6. Re: RF5: ajax request oncomplete issue
mechtatel Aug 23, 2013 6:49 PM (in response to bleathem)I checked it. It's a wrong object. Is the JS Window object.
Probably is related to the scope of 'this' maybe anonymous function on RF code.
-
7. Re: RF5: ajax request oncomplete issue
bleathem Aug 23, 2013 7:01 PM (in response to mechtatel)Thanks for clarifying. Can you file a jira issue with these details? Also, if you could check if this worked with earlier Mojarra (2.1.x) and/or RichFaces (4.3.x) release that would help out too. Regressions carry a lot of weight.
-
8. Re: RF5: ajax request oncomplete issue
mechtatel Sep 4, 2013 6:56 PM (in response to bleathem)I released that the bug already exists - https://issues.jboss.org/browse/RF-12292