Author: alexsmirnov
Date: 2008-03-31 15:09:03 -0400 (Mon, 31 Mar 2008)
New Revision: 7504
Modified:
trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
Log:
Fix
http://jira.jboss.com/jira/browse/RF-2532 &
http://jira.jboss.com/jira/browse/RF-2850
Modified: trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js
===================================================================
--- trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-03-31 18:49:56 UTC
(rev 7503)
+++ trunk/framework/impl/src/main/javascript/ajaxjsf/JSFAJAX.js 2008-03-31 19:09:03 UTC
(rev 7504)
@@ -847,11 +847,19 @@
LOG.debug("Namespace for hidden view-state input fields is
"+namespace);
var anchor =
namespace?window.document.getElementById(namespace):window.document;
var inputs = anchor.getElementsByTagName("input");
- var newinputs = req.getElementsByTagName("input",idsSpan);
- A4J.AJAX.replaceViewState(inputs,newinputs);
+ try {
+ var newinputs = req.getElementsByTagName("input",idsSpan);
+ A4J.AJAX.replaceViewState(inputs,newinputs);
+ } catch(e){
+ LOG.warn("No elements 'input' in response");
+ }
// For any cases, new state can be in uppercase element
- newinputs = req.getElementsByTagName("INPUT",idsSpan);
- A4J.AJAX.replaceViewState(inputs,newinputs);
+ try {
+ var newinputs = req.getElementsByTagName("INPUT",idsSpan);
+ A4J.AJAX.replaceViewState(inputs,newinputs);
+ } catch(e){
+ LOG.warn("No elements 'INPUT' in response");
+ }
}
// Process listeners.