[JBoss JIRA] (RF-13567) JavaScriptService executes javascript before the complete event
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13567?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on RF-13567:
---------------------------------
Just for clarity, server-side handlers are mapped in this code:
https://github.com/richfaces/richfaces/blob/master/framework/src/main/res...
> JavaScriptService executes javascript before the complete event
> ---------------------------------------------------------------
>
> Key: RF-13567
> URL: https://issues.jboss.org/browse/RF-13567
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Brian Leathem
>
> Using the javascript service to execute jQuery plugins ends up with the plugin being executed before the new elements are placed in the DOM. This results in stale element references during subsequent plugin execution.
> Console log with r:log enabled:
> {code}
> RichFaces: New request added to queue. Queue requestGroupingId changed to form1:richTable:0:collapsibleSubTable log.js:195
> RichFaces: Queue will wait 0ms before submit log.js:195
> RichFaces: richfaces.queue: will submit request NOW log.js:195
> RichFaces: Received 'begin' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> Destroy called for sub-table-bridge of element: form1:richTable:0:collapsibleSubTable sub-table-bridge.js:89
> Destroy called for sub-table of element: form1:richTable:0:collapsibleSubTable sub-table.js:71
> RichFaces: Received 'beforedomupdate' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> RichFaces: <span>Server returned responseText: </span><span class="rf-log-entry-msg-xml"><partial-response id="j_id1"><changes><update id="form1:richTable:0:collapsibleSubTable"><![CDATA[<tbody id="form1:richTable:0:collapsibleSubTable" class="rf-cst"><tr id="form1:richTable:0:collapsibleSubTable:f" class="rf-cst-ftr"><td class="rf-cst-ftr-c" colspan="3">footer<ul class="data-scroller " id="form1:richTable:0:collapsibleSubTable:subscroller"><li><a class="rf-ds-btn rf-ds-btn-first rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_f">««««</a></li><li><a class="rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_fr">««</a></li><li><a class="rf-ds-btn rf-ds-btn-prev rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_prev">«</a></li><li><a class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_next">»</a></li><li><a class="rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_ff">»»</a></li><li><a class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_l">»»»»</a></li><script type="text/javascript">new RichFaces.ui.DataScroller("form1:richTable:0:collapsibleSubTable:subscroller",function(event,element,data){RichFaces.ajax("form1:richTable:0:collapsibleSubTable:subscroller",event,{"parameters":{"form1:richTable:0:collapsibleSubTable:subscroller:page":data.page} ,"incId":"1"} )},{"digitals":{} ,"buttons":{} ,"currentPage":1} )</script></ul></td></tr><tr id="form1:richTable:0:collapsibleSubTable:sc" style="display: none;"><td><input id="form1:richTable:0:collapsibleSubTable:state" name="form1:richTable:0:collapsibleSubTable:state" type="hidden" value="0" /><input id="form1:richTable:0:collapsibleSubTable:options" name="form1:richTable:0:collapsibleSubTable:options" type="hidden" /></td></tr></tbody>]]></update><update id="j_id1:javax.faces.ViewState:0"><![CDATA[-7868019542578483246:-4058924891838140372]]></update><extension id="org.richfaces.extension"><complete>RichFaces.jQuery(document.getElementById('form1:richTable:0:collapsibleSubTable')).subTableBridge({"optionsInput":"form1:richTable:0:collapsibleSubTable:options","formId":"form1","expandMode":"ajax","stateInput":"form1:richTable:0:collapsibleSubTable:state","eventOptions":{"incId":"1"} } );RichFaces.javascriptServiceComplete();;</complete><render>form1:richTable:0:collapsibleSubTable@body </render></extension></changes></partial-response></span> log.js:195
> RichFaces: <span>Listing content of response <b>changes</b> element:<br>Element <b>update</b> for id=form1:richTable:0:collapsibleSubTable<br><span class="rf-log-entry-msg-xml"><update id="form1:richTable:0:collapsibleSubTable"><![CDATA[<tbody id="form1:richTable:0:collapsibleSubTable" class="rf-cst"><tr id="form1:richTable:0:collapsibleSubTable:f" class="rf-cst-ftr"><td class="rf-cst-ftr-c" colspan="3">footer<ul class="data-scroller " id="form1:richTable:0:collapsibleSubTable:subscroller"><li><a class="rf-ds-btn rf-ds-btn-first rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_f">««««</a></li><li><a class="rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_fr">««</a></li><li><a class="rf-ds-btn rf-ds-btn-prev rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_prev">«</a></li><li><a class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_next">»</a></li><li><a class="rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_ff">»»</a></li><li><a class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_l">»»»»</a></li><script type="text/javascript">new RichFaces.ui.DataScroller("form1:richTable:0:collapsibleSubTable:subscroller",function(event,element,data){RichFaces.ajax("form1:richTable:0:collapsibleSubTable:subscroller",event,{"parameters":{"form1:richTable:0:collapsibleSubTable:subscroller:page":data.page} ,"incId":"1"} )},{"digitals":{} ,"buttons":{} ,"currentPage":1} )</script></ul></td></tr><tr id="form1:richTable:0:collapsibleSubTable:sc" style="display: none;"><td><input id="form1:richTable:0:collapsibleSubTable:state" name="form1:richTable:0:collapsibleSubTable:state" type="hidden" value="0" /><input id="form1:richTable:0:collapsibleSubTable:options" name="form1:richTable:0:collapsibleSubTable:options" type="hidden" /></td></tr></tbody>]]></update></span><br>Element <b>update</b> for id=j_id1:javax.faces.ViewState:0<br><span class="rf-log-entry-msg-xml"><update id="j_id1:javax.faces.ViewState:0"><![CDATA[-7868019542578483246:-4058924891838140372]]></update></span><br>Element <b>extension</b> for id=org.richfaces.extension<br><span class="rf-log-entry-msg-xml"><extension id="org.richfaces.extension"><complete>RichFaces.jQuery(document.getElementById('form1:richTable:0:collapsibleSubTable')).subTableBridge({"optionsInput":"form1:richTable:0:collapsibleSubTable:options","formId":"form1","expandMode":"ajax","stateInput":"form1:richTable:0:collapsibleSubTable:state","eventOptions":{"incId":"1"} } );RichFaces.javascriptServiceComplete();;</complete><render>form1:richTable:0:collapsibleSubTable@body </render></extension></span><br></span> log.js:195
> Create called for sub-table-bridge of element: form1:richTable:0:collapsibleSubTable sub-table-bridge.js:42
> Create called for sub-table of element: form1:richTable:0:collapsibleSubTable sub-table.js:22
> RichFaces: richfaces.queue: ajax submit successfull log.js:195
> RichFaces: richfaces.queue: Nothing to submit log.js:195
> RichFaces: Received 'success' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> RichFaces: Received 'complete' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> {code}
> Note the "create" debug statements called from the plugin _create methods occur before we get to the complete event.
--
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
10 years, 8 months
[JBoss JIRA] (RF-13567) JavaScriptService executes javascript before the complete event
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13567?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč edited comment on RF-13567 at 3/6/14 4:45 PM:
---------------------------------------------------------
The details you have shared are about JSF event handling:
* onevent callback with either begin, complete or success
* onerror callback
but RichFaces extends this concept with:
* onbeforedomupdate (mapped to JSF's onevent('complete'))
* oncomplete (mapped to JSF's onevent('success'))
see the actual mapping here: https://github.com/richfaces/richfaces/blob/master/framework/src/main/res...
legend: onevent('complete') -> onbeforedomupdate
RichFaces JavaScriptService fires oncomplete, which means JSF's onevent('success'), which means "Occurs immediately after jsf.ajax.response has completed."
was (Author: lfryc):
The details you have shared are about JSF event handling:
* onevent callback with either begin, complete or success
* onerror callback
but RichFaces extends this concept with:
* onbeforedomupdate (mapped to JSF's onevent('complete'))
* oncomplete (mapped to JSF's onevent('success'))
RichFaces JavaScriptService fires oncomplete, which means JSF's onevent('success'), which means "Occurs immediately after jsf.ajax.response has completed."
> JavaScriptService executes javascript before the complete event
> ---------------------------------------------------------------
>
> Key: RF-13567
> URL: https://issues.jboss.org/browse/RF-13567
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Brian Leathem
>
> Using the javascript service to execute jQuery plugins ends up with the plugin being executed before the new elements are placed in the DOM. This results in stale element references during subsequent plugin execution.
> Console log with r:log enabled:
> {code}
> RichFaces: New request added to queue. Queue requestGroupingId changed to form1:richTable:0:collapsibleSubTable log.js:195
> RichFaces: Queue will wait 0ms before submit log.js:195
> RichFaces: richfaces.queue: will submit request NOW log.js:195
> RichFaces: Received 'begin' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> Destroy called for sub-table-bridge of element: form1:richTable:0:collapsibleSubTable sub-table-bridge.js:89
> Destroy called for sub-table of element: form1:richTable:0:collapsibleSubTable sub-table.js:71
> RichFaces: Received 'beforedomupdate' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> RichFaces: <span>Server returned responseText: </span><span class="rf-log-entry-msg-xml"><partial-response id="j_id1"><changes><update id="form1:richTable:0:collapsibleSubTable"><![CDATA[<tbody id="form1:richTable:0:collapsibleSubTable" class="rf-cst"><tr id="form1:richTable:0:collapsibleSubTable:f" class="rf-cst-ftr"><td class="rf-cst-ftr-c" colspan="3">footer<ul class="data-scroller " id="form1:richTable:0:collapsibleSubTable:subscroller"><li><a class="rf-ds-btn rf-ds-btn-first rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_f">««««</a></li><li><a class="rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_fr">««</a></li><li><a class="rf-ds-btn rf-ds-btn-prev rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_prev">«</a></li><li><a class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_next">»</a></li><li><a class="rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_ff">»»</a></li><li><a class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_l">»»»»</a></li><script type="text/javascript">new RichFaces.ui.DataScroller("form1:richTable:0:collapsibleSubTable:subscroller",function(event,element,data){RichFaces.ajax("form1:richTable:0:collapsibleSubTable:subscroller",event,{"parameters":{"form1:richTable:0:collapsibleSubTable:subscroller:page":data.page} ,"incId":"1"} )},{"digitals":{} ,"buttons":{} ,"currentPage":1} )</script></ul></td></tr><tr id="form1:richTable:0:collapsibleSubTable:sc" style="display: none;"><td><input id="form1:richTable:0:collapsibleSubTable:state" name="form1:richTable:0:collapsibleSubTable:state" type="hidden" value="0" /><input id="form1:richTable:0:collapsibleSubTable:options" name="form1:richTable:0:collapsibleSubTable:options" type="hidden" /></td></tr></tbody>]]></update><update id="j_id1:javax.faces.ViewState:0"><![CDATA[-7868019542578483246:-4058924891838140372]]></update><extension id="org.richfaces.extension"><complete>RichFaces.jQuery(document.getElementById('form1:richTable:0:collapsibleSubTable')).subTableBridge({"optionsInput":"form1:richTable:0:collapsibleSubTable:options","formId":"form1","expandMode":"ajax","stateInput":"form1:richTable:0:collapsibleSubTable:state","eventOptions":{"incId":"1"} } );RichFaces.javascriptServiceComplete();;</complete><render>form1:richTable:0:collapsibleSubTable@body </render></extension></changes></partial-response></span> log.js:195
> RichFaces: <span>Listing content of response <b>changes</b> element:<br>Element <b>update</b> for id=form1:richTable:0:collapsibleSubTable<br><span class="rf-log-entry-msg-xml"><update id="form1:richTable:0:collapsibleSubTable"><![CDATA[<tbody id="form1:richTable:0:collapsibleSubTable" class="rf-cst"><tr id="form1:richTable:0:collapsibleSubTable:f" class="rf-cst-ftr"><td class="rf-cst-ftr-c" colspan="3">footer<ul class="data-scroller " id="form1:richTable:0:collapsibleSubTable:subscroller"><li><a class="rf-ds-btn rf-ds-btn-first rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_f">««««</a></li><li><a class="rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_fr">««</a></li><li><a class="rf-ds-btn rf-ds-btn-prev rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_prev">«</a></li><li><a class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_next">»</a></li><li><a class="rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_ff">»»</a></li><li><a class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_l">»»»»</a></li><script type="text/javascript">new RichFaces.ui.DataScroller("form1:richTable:0:collapsibleSubTable:subscroller",function(event,element,data){RichFaces.ajax("form1:richTable:0:collapsibleSubTable:subscroller",event,{"parameters":{"form1:richTable:0:collapsibleSubTable:subscroller:page":data.page} ,"incId":"1"} )},{"digitals":{} ,"buttons":{} ,"currentPage":1} )</script></ul></td></tr><tr id="form1:richTable:0:collapsibleSubTable:sc" style="display: none;"><td><input id="form1:richTable:0:collapsibleSubTable:state" name="form1:richTable:0:collapsibleSubTable:state" type="hidden" value="0" /><input id="form1:richTable:0:collapsibleSubTable:options" name="form1:richTable:0:collapsibleSubTable:options" type="hidden" /></td></tr></tbody>]]></update></span><br>Element <b>update</b> for id=j_id1:javax.faces.ViewState:0<br><span class="rf-log-entry-msg-xml"><update id="j_id1:javax.faces.ViewState:0"><![CDATA[-7868019542578483246:-4058924891838140372]]></update></span><br>Element <b>extension</b> for id=org.richfaces.extension<br><span class="rf-log-entry-msg-xml"><extension id="org.richfaces.extension"><complete>RichFaces.jQuery(document.getElementById('form1:richTable:0:collapsibleSubTable')).subTableBridge({"optionsInput":"form1:richTable:0:collapsibleSubTable:options","formId":"form1","expandMode":"ajax","stateInput":"form1:richTable:0:collapsibleSubTable:state","eventOptions":{"incId":"1"} } );RichFaces.javascriptServiceComplete();;</complete><render>form1:richTable:0:collapsibleSubTable@body </render></extension></span><br></span> log.js:195
> Create called for sub-table-bridge of element: form1:richTable:0:collapsibleSubTable sub-table-bridge.js:42
> Create called for sub-table of element: form1:richTable:0:collapsibleSubTable sub-table.js:22
> RichFaces: richfaces.queue: ajax submit successfull log.js:195
> RichFaces: richfaces.queue: Nothing to submit log.js:195
> RichFaces: Received 'success' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> RichFaces: Received 'complete' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> {code}
> Note the "create" debug statements called from the plugin _create methods occur before we get to the complete event.
--
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
10 years, 8 months
[JBoss JIRA] (RF-13567) JavaScriptService executes javascript before the complete event
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13567?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč edited comment on RF-13567 at 3/6/14 4:46 PM:
---------------------------------------------------------
The details you have shared are about JSF event handling:
* onevent callback with either begin, complete or success
* onerror callback
but RichFaces extends this concept with:
* onbeforedomupdate (mapped to JSF's onevent('complete'))
* oncomplete (mapped to JSF's onevent('success'))
see the actual mapping here:
legend: {{onevent('complete') -> onbeforedomupdate}}
{code}
var jsfEventsAdapterEventNames = {
event: {
'begin': ['begin'],
'complete': ['beforedomupdate'],
'success': ['success', 'complete']
},
error: ['error', 'complete']
};
{code}
https://github.com/richfaces/richfaces/blob/master/framework/src/main/res...
RichFaces JavaScriptService fires oncomplete, which means JSF's onevent('success'), which means "Occurs immediately after jsf.ajax.response has completed."
was (Author: lfryc):
The details you have shared are about JSF event handling:
* onevent callback with either begin, complete or success
* onerror callback
but RichFaces extends this concept with:
* onbeforedomupdate (mapped to JSF's onevent('complete'))
* oncomplete (mapped to JSF's onevent('success'))
see the actual mapping here: https://github.com/richfaces/richfaces/blob/master/framework/src/main/res...
legend: onevent('complete') -> onbeforedomupdate
RichFaces JavaScriptService fires oncomplete, which means JSF's onevent('success'), which means "Occurs immediately after jsf.ajax.response has completed."
> JavaScriptService executes javascript before the complete event
> ---------------------------------------------------------------
>
> Key: RF-13567
> URL: https://issues.jboss.org/browse/RF-13567
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Brian Leathem
>
> Using the javascript service to execute jQuery plugins ends up with the plugin being executed before the new elements are placed in the DOM. This results in stale element references during subsequent plugin execution.
> Console log with r:log enabled:
> {code}
> RichFaces: New request added to queue. Queue requestGroupingId changed to form1:richTable:0:collapsibleSubTable log.js:195
> RichFaces: Queue will wait 0ms before submit log.js:195
> RichFaces: richfaces.queue: will submit request NOW log.js:195
> RichFaces: Received 'begin' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> Destroy called for sub-table-bridge of element: form1:richTable:0:collapsibleSubTable sub-table-bridge.js:89
> Destroy called for sub-table of element: form1:richTable:0:collapsibleSubTable sub-table.js:71
> RichFaces: Received 'beforedomupdate' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> RichFaces: <span>Server returned responseText: </span><span class="rf-log-entry-msg-xml"><partial-response id="j_id1"><changes><update id="form1:richTable:0:collapsibleSubTable"><![CDATA[<tbody id="form1:richTable:0:collapsibleSubTable" class="rf-cst"><tr id="form1:richTable:0:collapsibleSubTable:f" class="rf-cst-ftr"><td class="rf-cst-ftr-c" colspan="3">footer<ul class="data-scroller " id="form1:richTable:0:collapsibleSubTable:subscroller"><li><a class="rf-ds-btn rf-ds-btn-first rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_f">««««</a></li><li><a class="rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_fr">««</a></li><li><a class="rf-ds-btn rf-ds-btn-prev rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_prev">«</a></li><li><a class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_next">»</a></li><li><a class="rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_ff">»»</a></li><li><a class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_l">»»»»</a></li><script type="text/javascript">new RichFaces.ui.DataScroller("form1:richTable:0:collapsibleSubTable:subscroller",function(event,element,data){RichFaces.ajax("form1:richTable:0:collapsibleSubTable:subscroller",event,{"parameters":{"form1:richTable:0:collapsibleSubTable:subscroller:page":data.page} ,"incId":"1"} )},{"digitals":{} ,"buttons":{} ,"currentPage":1} )</script></ul></td></tr><tr id="form1:richTable:0:collapsibleSubTable:sc" style="display: none;"><td><input id="form1:richTable:0:collapsibleSubTable:state" name="form1:richTable:0:collapsibleSubTable:state" type="hidden" value="0" /><input id="form1:richTable:0:collapsibleSubTable:options" name="form1:richTable:0:collapsibleSubTable:options" type="hidden" /></td></tr></tbody>]]></update><update id="j_id1:javax.faces.ViewState:0"><![CDATA[-7868019542578483246:-4058924891838140372]]></update><extension id="org.richfaces.extension"><complete>RichFaces.jQuery(document.getElementById('form1:richTable:0:collapsibleSubTable')).subTableBridge({"optionsInput":"form1:richTable:0:collapsibleSubTable:options","formId":"form1","expandMode":"ajax","stateInput":"form1:richTable:0:collapsibleSubTable:state","eventOptions":{"incId":"1"} } );RichFaces.javascriptServiceComplete();;</complete><render>form1:richTable:0:collapsibleSubTable@body </render></extension></changes></partial-response></span> log.js:195
> RichFaces: <span>Listing content of response <b>changes</b> element:<br>Element <b>update</b> for id=form1:richTable:0:collapsibleSubTable<br><span class="rf-log-entry-msg-xml"><update id="form1:richTable:0:collapsibleSubTable"><![CDATA[<tbody id="form1:richTable:0:collapsibleSubTable" class="rf-cst"><tr id="form1:richTable:0:collapsibleSubTable:f" class="rf-cst-ftr"><td class="rf-cst-ftr-c" colspan="3">footer<ul class="data-scroller " id="form1:richTable:0:collapsibleSubTable:subscroller"><li><a class="rf-ds-btn rf-ds-btn-first rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_f">««««</a></li><li><a class="rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_fr">««</a></li><li><a class="rf-ds-btn rf-ds-btn-prev rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_prev">«</a></li><li><a class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_next">»</a></li><li><a class="rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_ff">»»</a></li><li><a class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_l">»»»»</a></li><script type="text/javascript">new RichFaces.ui.DataScroller("form1:richTable:0:collapsibleSubTable:subscroller",function(event,element,data){RichFaces.ajax("form1:richTable:0:collapsibleSubTable:subscroller",event,{"parameters":{"form1:richTable:0:collapsibleSubTable:subscroller:page":data.page} ,"incId":"1"} )},{"digitals":{} ,"buttons":{} ,"currentPage":1} )</script></ul></td></tr><tr id="form1:richTable:0:collapsibleSubTable:sc" style="display: none;"><td><input id="form1:richTable:0:collapsibleSubTable:state" name="form1:richTable:0:collapsibleSubTable:state" type="hidden" value="0" /><input id="form1:richTable:0:collapsibleSubTable:options" name="form1:richTable:0:collapsibleSubTable:options" type="hidden" /></td></tr></tbody>]]></update></span><br>Element <b>update</b> for id=j_id1:javax.faces.ViewState:0<br><span class="rf-log-entry-msg-xml"><update id="j_id1:javax.faces.ViewState:0"><![CDATA[-7868019542578483246:-4058924891838140372]]></update></span><br>Element <b>extension</b> for id=org.richfaces.extension<br><span class="rf-log-entry-msg-xml"><extension id="org.richfaces.extension"><complete>RichFaces.jQuery(document.getElementById('form1:richTable:0:collapsibleSubTable')).subTableBridge({"optionsInput":"form1:richTable:0:collapsibleSubTable:options","formId":"form1","expandMode":"ajax","stateInput":"form1:richTable:0:collapsibleSubTable:state","eventOptions":{"incId":"1"} } );RichFaces.javascriptServiceComplete();;</complete><render>form1:richTable:0:collapsibleSubTable@body </render></extension></span><br></span> log.js:195
> Create called for sub-table-bridge of element: form1:richTable:0:collapsibleSubTable sub-table-bridge.js:42
> Create called for sub-table of element: form1:richTable:0:collapsibleSubTable sub-table.js:22
> RichFaces: richfaces.queue: ajax submit successfull log.js:195
> RichFaces: richfaces.queue: Nothing to submit log.js:195
> RichFaces: Received 'success' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> RichFaces: Received 'complete' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> {code}
> Note the "create" debug statements called from the plugin _create methods occur before we get to the complete event.
--
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
10 years, 8 months
[JBoss JIRA] (RF-13567) JavaScriptService executes javascript before the complete event
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13567?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on RF-13567:
---------------------------------
The details you have shared are about JSF event handling:
* onevent callback with either begin, complete or success
* onerror callback
but RichFaces extends this concept with:
* onbeforedomupdate (mapped to JSF's onevent('complete'))
* oncomplete (mapped to JSF's onevent('success'))
RichFaces JavaScriptService fires oncomplete, which means JSF's onevent('success'), which means "Occurs immediately after jsf.ajax.response has completed."
> JavaScriptService executes javascript before the complete event
> ---------------------------------------------------------------
>
> Key: RF-13567
> URL: https://issues.jboss.org/browse/RF-13567
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Brian Leathem
>
> Using the javascript service to execute jQuery plugins ends up with the plugin being executed before the new elements are placed in the DOM. This results in stale element references during subsequent plugin execution.
> Console log with r:log enabled:
> {code}
> RichFaces: New request added to queue. Queue requestGroupingId changed to form1:richTable:0:collapsibleSubTable log.js:195
> RichFaces: Queue will wait 0ms before submit log.js:195
> RichFaces: richfaces.queue: will submit request NOW log.js:195
> RichFaces: Received 'begin' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> Destroy called for sub-table-bridge of element: form1:richTable:0:collapsibleSubTable sub-table-bridge.js:89
> Destroy called for sub-table of element: form1:richTable:0:collapsibleSubTable sub-table.js:71
> RichFaces: Received 'beforedomupdate' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> RichFaces: <span>Server returned responseText: </span><span class="rf-log-entry-msg-xml"><partial-response id="j_id1"><changes><update id="form1:richTable:0:collapsibleSubTable"><![CDATA[<tbody id="form1:richTable:0:collapsibleSubTable" class="rf-cst"><tr id="form1:richTable:0:collapsibleSubTable:f" class="rf-cst-ftr"><td class="rf-cst-ftr-c" colspan="3">footer<ul class="data-scroller " id="form1:richTable:0:collapsibleSubTable:subscroller"><li><a class="rf-ds-btn rf-ds-btn-first rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_f">««««</a></li><li><a class="rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_fr">««</a></li><li><a class="rf-ds-btn rf-ds-btn-prev rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_prev">«</a></li><li><a class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_next">»</a></li><li><a class="rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_ff">»»</a></li><li><a class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_l">»»»»</a></li><script type="text/javascript">new RichFaces.ui.DataScroller("form1:richTable:0:collapsibleSubTable:subscroller",function(event,element,data){RichFaces.ajax("form1:richTable:0:collapsibleSubTable:subscroller",event,{"parameters":{"form1:richTable:0:collapsibleSubTable:subscroller:page":data.page} ,"incId":"1"} )},{"digitals":{} ,"buttons":{} ,"currentPage":1} )</script></ul></td></tr><tr id="form1:richTable:0:collapsibleSubTable:sc" style="display: none;"><td><input id="form1:richTable:0:collapsibleSubTable:state" name="form1:richTable:0:collapsibleSubTable:state" type="hidden" value="0" /><input id="form1:richTable:0:collapsibleSubTable:options" name="form1:richTable:0:collapsibleSubTable:options" type="hidden" /></td></tr></tbody>]]></update><update id="j_id1:javax.faces.ViewState:0"><![CDATA[-7868019542578483246:-4058924891838140372]]></update><extension id="org.richfaces.extension"><complete>RichFaces.jQuery(document.getElementById('form1:richTable:0:collapsibleSubTable')).subTableBridge({"optionsInput":"form1:richTable:0:collapsibleSubTable:options","formId":"form1","expandMode":"ajax","stateInput":"form1:richTable:0:collapsibleSubTable:state","eventOptions":{"incId":"1"} } );RichFaces.javascriptServiceComplete();;</complete><render>form1:richTable:0:collapsibleSubTable@body </render></extension></changes></partial-response></span> log.js:195
> RichFaces: <span>Listing content of response <b>changes</b> element:<br>Element <b>update</b> for id=form1:richTable:0:collapsibleSubTable<br><span class="rf-log-entry-msg-xml"><update id="form1:richTable:0:collapsibleSubTable"><![CDATA[<tbody id="form1:richTable:0:collapsibleSubTable" class="rf-cst"><tr id="form1:richTable:0:collapsibleSubTable:f" class="rf-cst-ftr"><td class="rf-cst-ftr-c" colspan="3">footer<ul class="data-scroller " id="form1:richTable:0:collapsibleSubTable:subscroller"><li><a class="rf-ds-btn rf-ds-btn-first rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_f">««««</a></li><li><a class="rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_fr">««</a></li><li><a class="rf-ds-btn rf-ds-btn-prev rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_prev">«</a></li><li><a class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_next">»</a></li><li><a class="rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_ff">»»</a></li><li><a class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_l">»»»»</a></li><script type="text/javascript">new RichFaces.ui.DataScroller("form1:richTable:0:collapsibleSubTable:subscroller",function(event,element,data){RichFaces.ajax("form1:richTable:0:collapsibleSubTable:subscroller",event,{"parameters":{"form1:richTable:0:collapsibleSubTable:subscroller:page":data.page} ,"incId":"1"} )},{"digitals":{} ,"buttons":{} ,"currentPage":1} )</script></ul></td></tr><tr id="form1:richTable:0:collapsibleSubTable:sc" style="display: none;"><td><input id="form1:richTable:0:collapsibleSubTable:state" name="form1:richTable:0:collapsibleSubTable:state" type="hidden" value="0" /><input id="form1:richTable:0:collapsibleSubTable:options" name="form1:richTable:0:collapsibleSubTable:options" type="hidden" /></td></tr></tbody>]]></update></span><br>Element <b>update</b> for id=j_id1:javax.faces.ViewState:0<br><span class="rf-log-entry-msg-xml"><update id="j_id1:javax.faces.ViewState:0"><![CDATA[-7868019542578483246:-4058924891838140372]]></update></span><br>Element <b>extension</b> for id=org.richfaces.extension<br><span class="rf-log-entry-msg-xml"><extension id="org.richfaces.extension"><complete>RichFaces.jQuery(document.getElementById('form1:richTable:0:collapsibleSubTable')).subTableBridge({"optionsInput":"form1:richTable:0:collapsibleSubTable:options","formId":"form1","expandMode":"ajax","stateInput":"form1:richTable:0:collapsibleSubTable:state","eventOptions":{"incId":"1"} } );RichFaces.javascriptServiceComplete();;</complete><render>form1:richTable:0:collapsibleSubTable@body </render></extension></span><br></span> log.js:195
> Create called for sub-table-bridge of element: form1:richTable:0:collapsibleSubTable sub-table-bridge.js:42
> Create called for sub-table of element: form1:richTable:0:collapsibleSubTable sub-table.js:22
> RichFaces: richfaces.queue: ajax submit successfull log.js:195
> RichFaces: richfaces.queue: Nothing to submit log.js:195
> RichFaces: Received 'success' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> RichFaces: Received 'complete' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> {code}
> Note the "create" debug statements called from the plugin _create methods occur before we get to the complete event.
--
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
10 years, 8 months
[JBoss JIRA] (RF-13570) a4j:ajax and r:ajax conflict
by Ken H (JIRA)
[ https://issues.jboss.org/browse/RF-13570?page=com.atlassian.jira.plugin.s... ]
Ken H commented on RF-13570:
----------------------------
To clarify, if you couldn't guess, this is happening with a4j:ajax/r:ajax tags inside the scope of an a4j:queue.
> a4j:ajax and r:ajax conflict
> ----------------------------
>
> Key: RF-13570
> URL: https://issues.jboss.org/browse/RF-13570
> Project: RichFaces
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 4.5.0.Alpha2
> Reporter: Ken H
>
> Using both a4j:ajax and r:ajax tags results in a cast exception:
> {code}
> Exception logged: org.richfaces.view.facelets.html.AttachQueueStack cannot be cast to org.richfaces.ui.ajax.queue.AttachQueueStack: java.lang.ClassCastException: org.richfaces.view.facelets.html.AttachQueueStack cannot be cast to org.richfaces.ui.ajax.queue.AttachQueueStack
> at org.richfaces.ui.ajax.queue.AttachQueueStack.getStack(AttachQueueStack.java:43) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
> at org.richfaces.ui.ajax.ajax.AjaxHandler.apply(AjaxHandler.java:104) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
> at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
> at org.richfaces.ui.behavior.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
> at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:203) [jsf-impl-2.2.5-jbossorg-3.jar:]
> at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
> at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
> at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
> at org.richfaces.ui.behavior.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
> at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:203) [jsf-impl-2.2.5-jbossorg-3.jar:]
> {code}
> Changing all a4j:ajax tags to r:ajax resolves this but defeats the compatibility goal of having the dual namespaces.
--
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
10 years, 8 months
[JBoss JIRA] (RF-13570) a4j:ajax and r:ajax conflict
by Ken H (JIRA)
Ken H created RF-13570:
--------------------------
Summary: a4j:ajax and r:ajax conflict
Key: RF-13570
URL: https://issues.jboss.org/browse/RF-13570
Project: RichFaces
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 4.5.0.Alpha2
Reporter: Ken H
Using both a4j:ajax and r:ajax tags results in a cast exception:
{code}
Exception logged: org.richfaces.view.facelets.html.AttachQueueStack cannot be cast to org.richfaces.ui.ajax.queue.AttachQueueStack: java.lang.ClassCastException: org.richfaces.view.facelets.html.AttachQueueStack cannot be cast to org.richfaces.ui.ajax.queue.AttachQueueStack
at org.richfaces.ui.ajax.queue.AttachQueueStack.getStack(AttachQueueStack.java:43) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
at org.richfaces.ui.ajax.ajax.AjaxHandler.apply(AjaxHandler.java:104) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
at org.richfaces.ui.behavior.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:203) [jsf-impl-2.2.5-jbossorg-3.jar:]
at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:137) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
at org.richfaces.ui.behavior.BehaviorsAddingComponentHandlerWrapper.applyNextHandler(BehaviorsAddingComponentHandlerWrapper.java:53) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:203) [jsf-impl-2.2.5-jbossorg-3.jar:]
{code}
Changing all a4j:ajax tags to r:ajax resolves this but defeats the compatibility goal of having the dual namespaces.
--
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
10 years, 8 months
[JBoss JIRA] (RF-13567) JavaScriptService executes javascript before the complete event
by Brian Leathem (JIRA)
[ https://issues.jboss.org/browse/RF-13567?page=com.atlassian.jira.plugin.s... ]
Brian Leathem commented on RF-13567:
------------------------------------
Thanks for the reply [~lfryc]
As per the spec:
{code:title=JSF Spec, section 14.4.1}
begin
Occurs immediately before the request is sent.
complete
Occurs immediately after the request has completed. For successful
requests, this is immediately before javax.faces.response is called. For
unsuccessful requests, this is immediately before the error handling
callback is invoked.
success
Occurs immediately after jsf.ajax.response has completed.
{code}
This implies to me that the "oncomplete" event is fired after the response is received, but before the response is processed. This is confirmed by Manfred Riem in IRC:
{code}
│09:34:29 bleathem | the "oncomplete" event occurs "Occurs immediately after the request has completed."
│09:34:39 bleathem | is that before or after the DOM is updated?
│09:35:10 mriem | I would assume it would be after
│09:35:17 mriem | As it signals completion
│09:35:20 --> | bunbury (~bunbury(a)207.204.71.18) has joined ##jsf
│09:35:29 mriem | Let me check
│09:35:39 bleathem | so whhat happens between "complete" and "success"?
│09:35:53 bleathem | Success "Occurs immediately after jsf.ajax.response has completed."
│09:38:21 mriem | Mmm, looks like complete is there so you can do manual processing of the response
│09:38:43 mriem | From the docs "If the request completed successfully invoke
│ | file:///Users/mriem/Documents/JSF%20Specifcations/JSF%202.2%20Specification/jsdocs/symbols/jsf.ajax.html#.response
│ | passing the request object."
│09:38:48 bleathem | so complete is before the response is processed?
│09:38:56 mriem | Yes looks like it
│09:39:02 mriem | The request completed.
│09:39:15 mriem | But has not been handled by the response function yet
{code}
Finally this is consistent with descriptions given [on stackoverflow|http://stackoverflow.com/questions/13540298/proccess-onclic...].
So IMO we need to change the javascript service to execute with the _success_ event, rather than the _complete_ event.
> JavaScriptService executes javascript before the complete event
> ---------------------------------------------------------------
>
> Key: RF-13567
> URL: https://issues.jboss.org/browse/RF-13567
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Brian Leathem
>
> Using the javascript service to execute jQuery plugins ends up with the plugin being executed before the new elements are placed in the DOM. This results in stale element references during subsequent plugin execution.
> Console log with r:log enabled:
> {code}
> RichFaces: New request added to queue. Queue requestGroupingId changed to form1:richTable:0:collapsibleSubTable log.js:195
> RichFaces: Queue will wait 0ms before submit log.js:195
> RichFaces: richfaces.queue: will submit request NOW log.js:195
> RichFaces: Received 'begin' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> Destroy called for sub-table-bridge of element: form1:richTable:0:collapsibleSubTable sub-table-bridge.js:89
> Destroy called for sub-table of element: form1:richTable:0:collapsibleSubTable sub-table.js:71
> RichFaces: Received 'beforedomupdate' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> RichFaces: <span>Server returned responseText: </span><span class="rf-log-entry-msg-xml"><partial-response id="j_id1"><changes><update id="form1:richTable:0:collapsibleSubTable"><![CDATA[<tbody id="form1:richTable:0:collapsibleSubTable" class="rf-cst"><tr id="form1:richTable:0:collapsibleSubTable:f" class="rf-cst-ftr"><td class="rf-cst-ftr-c" colspan="3">footer<ul class="data-scroller " id="form1:richTable:0:collapsibleSubTable:subscroller"><li><a class="rf-ds-btn rf-ds-btn-first rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_f">««««</a></li><li><a class="rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_fr">««</a></li><li><a class="rf-ds-btn rf-ds-btn-prev rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_prev">«</a></li><li><a class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_next">»</a></li><li><a class="rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_ff">»»</a></li><li><a class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_l">»»»»</a></li><script type="text/javascript">new RichFaces.ui.DataScroller("form1:richTable:0:collapsibleSubTable:subscroller",function(event,element,data){RichFaces.ajax("form1:richTable:0:collapsibleSubTable:subscroller",event,{"parameters":{"form1:richTable:0:collapsibleSubTable:subscroller:page":data.page} ,"incId":"1"} )},{"digitals":{} ,"buttons":{} ,"currentPage":1} )</script></ul></td></tr><tr id="form1:richTable:0:collapsibleSubTable:sc" style="display: none;"><td><input id="form1:richTable:0:collapsibleSubTable:state" name="form1:richTable:0:collapsibleSubTable:state" type="hidden" value="0" /><input id="form1:richTable:0:collapsibleSubTable:options" name="form1:richTable:0:collapsibleSubTable:options" type="hidden" /></td></tr></tbody>]]></update><update id="j_id1:javax.faces.ViewState:0"><![CDATA[-7868019542578483246:-4058924891838140372]]></update><extension id="org.richfaces.extension"><complete>RichFaces.jQuery(document.getElementById('form1:richTable:0:collapsibleSubTable')).subTableBridge({"optionsInput":"form1:richTable:0:collapsibleSubTable:options","formId":"form1","expandMode":"ajax","stateInput":"form1:richTable:0:collapsibleSubTable:state","eventOptions":{"incId":"1"} } );RichFaces.javascriptServiceComplete();;</complete><render>form1:richTable:0:collapsibleSubTable@body </render></extension></changes></partial-response></span> log.js:195
> RichFaces: <span>Listing content of response <b>changes</b> element:<br>Element <b>update</b> for id=form1:richTable:0:collapsibleSubTable<br><span class="rf-log-entry-msg-xml"><update id="form1:richTable:0:collapsibleSubTable"><![CDATA[<tbody id="form1:richTable:0:collapsibleSubTable" class="rf-cst"><tr id="form1:richTable:0:collapsibleSubTable:f" class="rf-cst-ftr"><td class="rf-cst-ftr-c" colspan="3">footer<ul class="data-scroller " id="form1:richTable:0:collapsibleSubTable:subscroller"><li><a class="rf-ds-btn rf-ds-btn-first rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_f">««««</a></li><li><a class="rf-ds-btn rf-ds-btn-fastrwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_fr">««</a></li><li><a class="rf-ds-btn rf-ds-btn-prev rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_prev">«</a></li><li><a class="rf-ds-btn rf-ds-btn-next rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_next">»</a></li><li><a class="rf-ds-btn rf-ds-btn-fastfwd rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_ff">»»</a></li><li><a class="rf-ds-btn rf-ds-btn-last rf-ds-dis" id="form1:richTable:0:collapsibleSubTable:subscroller_ds_l">»»»»</a></li><script type="text/javascript">new RichFaces.ui.DataScroller("form1:richTable:0:collapsibleSubTable:subscroller",function(event,element,data){RichFaces.ajax("form1:richTable:0:collapsibleSubTable:subscroller",event,{"parameters":{"form1:richTable:0:collapsibleSubTable:subscroller:page":data.page} ,"incId":"1"} )},{"digitals":{} ,"buttons":{} ,"currentPage":1} )</script></ul></td></tr><tr id="form1:richTable:0:collapsibleSubTable:sc" style="display: none;"><td><input id="form1:richTable:0:collapsibleSubTable:state" name="form1:richTable:0:collapsibleSubTable:state" type="hidden" value="0" /><input id="form1:richTable:0:collapsibleSubTable:options" name="form1:richTable:0:collapsibleSubTable:options" type="hidden" /></td></tr></tbody>]]></update></span><br>Element <b>update</b> for id=j_id1:javax.faces.ViewState:0<br><span class="rf-log-entry-msg-xml"><update id="j_id1:javax.faces.ViewState:0"><![CDATA[-7868019542578483246:-4058924891838140372]]></update></span><br>Element <b>extension</b> for id=org.richfaces.extension<br><span class="rf-log-entry-msg-xml"><extension id="org.richfaces.extension"><complete>RichFaces.jQuery(document.getElementById('form1:richTable:0:collapsibleSubTable')).subTableBridge({"optionsInput":"form1:richTable:0:collapsibleSubTable:options","formId":"form1","expandMode":"ajax","stateInput":"form1:richTable:0:collapsibleSubTable:state","eventOptions":{"incId":"1"} } );RichFaces.javascriptServiceComplete();;</complete><render>form1:richTable:0:collapsibleSubTable@body </render></extension></span><br></span> log.js:195
> Create called for sub-table-bridge of element: form1:richTable:0:collapsibleSubTable sub-table-bridge.js:42
> Create called for sub-table of element: form1:richTable:0:collapsibleSubTable sub-table.js:22
> RichFaces: richfaces.queue: ajax submit successfull log.js:195
> RichFaces: richfaces.queue: Nothing to submit log.js:195
> RichFaces: Received 'success' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> RichFaces: Received 'complete' event from <tbody id=form1:richTable:0:collapsibleSubTable class=rf-cst ...> log.js:195
> {code}
> Note the "create" debug statements called from the plugin _create methods occur before we get to the complete event.
--
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
10 years, 8 months
[JBoss JIRA] (RF-13568) IllegalArgumentException for PushResource.jsf
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13568?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč edited comment on RF-13568 at 3/6/14 11:11 AM:
----------------------------------------------------------
[~juergen.zimmermann] I guess everything is okay with WildFly 8 Final?
--Hey [~swd847], anything changed with respect to request parameter handling in Undertow 1.0.1?--
was (Author: lfryc):
[~juergen.zimmermann] I guess everything is okay with WildFly 8 Final?
Hey [~swd847], anything changed with respect to request parameter handling in Undertow 1.0.1?
> IllegalArgumentException for PushResource.jsf
> ---------------------------------------------
>
> Key: RF-13568
> URL: https://issues.jboss.org/browse/RF-13568
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-push/poll
> Affects Versions: 5.0.0.Alpha3
> Environment: WildFly snapshot with Undertow 1.0.1
> Reporter: Juergen Zimmermann
>
> Im using the latest WildFly snapshot containing Undertow 1.0.1. I'm getting tons of stacktraces like the following:
> {code}
> [io.undertow.request] UT005023: Exception handling request to /shop/rfRes/org.richfaces.ui.ajax.push.PushResource.jsf: java.lang.IllegalArgumentException: pushTopic request parameter must be present
> at org.richfaces.ui.ajax.push.PushResource.encode(PushResource.java:87) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
> at org.richfaces.resource.UserResourceWrapperImpl.encode(UserResourceWrapperImpl.java:187) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:229) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:643) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0]
> {code}
--
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
10 years, 8 months
[JBoss JIRA] (RF-12897) ExtendedPartialViewContextImpl swallows exceptions
by Cristian Cerb (JIRA)
[ https://issues.jboss.org/browse/RF-12897?page=com.atlassian.jira.plugin.s... ]
Cristian Cerb commented on RF-12897:
------------------------------------
I think it does, but I need to test it more extensively.
> ExtendedPartialViewContextImpl swallows exceptions
> --------------------------------------------------
>
> Key: RF-12897
> URL: https://issues.jboss.org/browse/RF-12897
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 4.2.2.Final
> Environment: Windows 7, JDK 1.6
> Reporter: Cristian Cerb
> Assignee: Lukáš Fryč
> Labels: richfaces
> Fix For: 5.0.0.Alpha4
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> Method public VisitResult visit(VisitContext context, UIComponent target) of class ExtendedPartialViewContextImpl swallows exceptions. I think exceptions should be wrapped inside a FaceException and propagated. This class http://java.net/projects/mojarra/sources/svn/content/trunk/jsf-ri/src/mai... seems to have served as a model for the RF one, but the RF class inadvertently chose to swallow exceptions instead of propagating them up. This causes unpredictable behaviour, such as system being stuck in the browser.
> I just found an older version of Sun's Mojarra where they had the same issue, but the newer versions seem to have fixed it. See this taken from jsf 2.1.4:
> {code}
> public VisitResult visit(VisitContext context, UIComponent comp) {
> try {
> if (curPhase == PhaseId.APPLY_REQUEST_VALUES) {
> // RELEASE_PENDING handle immediate request(s)
> // If the user requested an immediate request
> // Make sure to set the immediate flag here.
> comp.processDecodes(ctx);
> } else if (curPhase == PhaseId.PROCESS_VALIDATIONS) {
> comp.processValidators(ctx);
> } else if (curPhase == PhaseId.UPDATE_MODEL_VALUES) {
> comp.processUpdates(ctx);
> } else if (curPhase == PhaseId.RENDER_RESPONSE) {
> PartialResponseWriter writer = ctx.getPartialViewContext().getPartialResponseWriter();
> writer.startUpdate(comp.getClientId(ctx));
> try {
> // do the default behavior...
> comp.encodeAll(ctx);
> }
> catch (Exception ce) {
> if (LOGGER.isLoggable(Level.SEVERE)) {
> LOGGER.severe(ce.toString());
> }
> if (LOGGER.isLoggable(Level.FINE)) {
> LOGGER.log(Level.FINE,
> ce.toString(),
> ce);
> }
> }
> writer.endUpdate();
> }
> else {
> throw new IllegalStateException("I18N: Unexpected " +
> "PhaseId passed to " +
> " PhaseAwareContextCallback: " +
> curPhase.toString());
> }
> }
> catch (IOException ex) {
> ex.printStackTrace();
> }
> // Once we visit a component, there is no need to visit
> // its children, since processDecodes/Validators/Updates and
> // encodeAll() already traverse the subtree. We return
> // VisitResult.REJECT to supress the subtree visit.
> return VisitResult.REJECT;
> }
> }
> {code}
--
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
10 years, 8 months
[JBoss JIRA] (RF-13568) IllegalArgumentException for PushResource.jsf
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/RF-13568?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on RF-13568:
---------------------------------
Ok, thanks for update.
> IllegalArgumentException for PushResource.jsf
> ---------------------------------------------
>
> Key: RF-13568
> URL: https://issues.jboss.org/browse/RF-13568
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-push/poll
> Affects Versions: 5.0.0.Alpha3
> Environment: WildFly snapshot with Undertow 1.0.1
> Reporter: Juergen Zimmermann
>
> Im using the latest WildFly snapshot containing Undertow 1.0.1. I'm getting tons of stacktraces like the following:
> {code}
> [io.undertow.request] UT005023: Exception handling request to /shop/rfRes/org.richfaces.ui.ajax.push.PushResource.jsf: java.lang.IllegalArgumentException: pushTopic request parameter must be present
> at org.richfaces.ui.ajax.push.PushResource.encode(PushResource.java:87) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
> at org.richfaces.resource.UserResourceWrapperImpl.encode(UserResourceWrapperImpl.java:187) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
> at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:229) [richfaces-5.0.0.Alpha3.jar:5.0.0.Alpha3]
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:643) [jboss-jsf-api_2.2_spec-2.2.5.jar:2.2.5]
> at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687) [undertow-core-1.0.1.Final.jar:1.0.1.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0]
> {code}
--
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
10 years, 8 months