a4j:commandButton stopped working
roykachouh Dec 17, 2007 3:01 PMHello all,
I was hoping you can help me out with a problem.
My a4j:commandButton is not being submitted to my ajax listener, i had no problems with this before.
I have an xhtml page that includes a form. Within the form tag, I use the ui include tag to include an entry page to allow users to create products as such:
<ui:include src="dataEntry/productEntry.xhtml"></ui:include>
In productEntry.xhtml I am trying to perform an ajax request using the following...
a4j:commandButton action="#{AJAX_CREATE_PRODUCT.processAjaxRequest}" onclick="Richfaces.showModalPanel('refreshPage',{left: 'auto'})" oncomplete="Richfaces.hideModalPanel('refreshPage')" reRender="productList,productEntry,productListDataScroller,statusMessage" value="SaveAjax" style="background-color: #cc0000; font-weight: bold; font-size: 12px; color: white;"
I have my listener defined in faces-config, and everything else appears to be copasetic.
I am using the richfaces 3.1.2SP1 release.
The a4j:log tag produced the following log:
debug[14:48:58,334]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: click debug[14:48:58,334]: NEW AJAX REQUEST !!! with form :pricingConfig debug[14:48:58,334]: Append hidden control pricingConfig:configTabPanel with value [productTypesTab] and value attribute [productTypesTab] debug[14:48:58,334]: Append text control pricingConfig:productType with value [test] and value attribute [test] debug[14:48:58,334]: Append textarea control pricingConfig:productDescription with value [test] and value attribute [test] debug[14:48:58,334]: Append text control pricingConfig:pricingSourceId with value [] and value attribute [] debug[14:48:58,334]: Append textarea control pricingConfig:productSourceDescription with value [] and value attribute [] debug[14:48:58,350]: Append text control pricingConfig:calculationId with value [] and value attribute [] debug[14:48:58,350]: Append textarea control pricingConfig:calculationDescription with value [] and value attribute [] debug[14:48:58,350]: Append text control pricingConfig:pricingFieldName with value [] and value attribute [] debug[14:48:58,350]: Append textarea control pricingConfig:pricingFieldDescription with value [] and value attribute [] debug[14:48:58,365]: Append text control pricingConfig:pricingAccountNumber with value [0] and value attribute [0] debug[14:48:58,365]: Append text control pricingConfig:pricingBranchCode with value [0] and value attribute [0] debug[14:48:58,365]: Append hidden control com.sun.faces.VIEW with value [_id2] and value attribute [_id2] debug[14:48:58,365]: Append hidden control pricingConfig with value [pricingConfig] and value attribute [pricingConfig] debug[14:48:58,365]: parameter pricingConfig:_id47 with value pricingConfig:_id47 debug[14:48:58,365]: Start XmlHttpRequest debug[14:48:58,365]: Reqest state : 1 debug[14:48:58,365]: QueryString: AJAXREQUEST=_viewRoot&pricingConfig%3AconfigTabPanel=productTypesTab&pricingConfig%3AproductType=test&pricingConfig%3AproductDescription=test&pricingConfig%3ApricingStrategyFlag=PX&pricingConfig%3ApricingSourceId=&pricingConfig%3AproductSourceDescription=&pricingConfig%3AcalculationId=&pricingConfig%3AcalculationDescription=&pricingConfig%3ApricingFieldName=&pricingConfig%3ApricingFieldDescription=&pricingConfig%3ApricingAccountNumber=0&pricingConfig%3ApricingBranchCode=0&com.sun.faces.VIEW=_id2&pricingConfig=pricingConfig&pricingConfig%3A_id47=pricingConfig%3A_id47& debug[14:48:58,365]: Reqest state : 1 debug[14:48:58,772]: Reqest state : 2 debug[14:48:58,772]: Reqest state : 3 debug[14:48:58,772]: Reqest state : 4 debug[14:48:58,772]: Reqest end with state 4 debug[14:48:58,772]: Response with content-type: text/xml;charset=UTF-8 debug[14:48:58,787]: Full response content: <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><link type="text/css" rel="stylesheet" href="/JPM/a4j_3_1_2.GAorg/richfaces/renderkit/html/css/modalPanel.xcss/DATB/eAE7K8drAAAD3AEp.jef" /><link type="text/css" rel="stylesheet" href="/JPM/a4j_3_1_2.GAcss/panel.xcss/DATB/eAE7K8drAAAD3AEp.jef" /><link type="text/css" rel="stylesheet" href="/JPM/a4j_3_1_2.GAcss/spacer.xcss/DATB/eAE7K8drAAAD3AEp.jef" /><link type="text/css" rel="stylesheet" href="/JPM/a4j_3_1_2.GAcss/toolBar.xcss/DATB/eAE7K8drAAAD3AEp.jef" /><link type="text/css" rel="stylesheet" href="/JPM/a4j_3_1_2.GAcss/tabPanel.xcss/DATB/eAE7K8drAAAD3AEp.jef" /><link type="text/css" rel="stylesheet" href="/JPM/a4j_3_1_2.GAcss/table.xcss/DATB/eAE7K8drAAAD3AEp.jef" /><link type="text/css" rel="stylesheet" href="/JPM/a4j_3_1_2.GAcss/datascroller.xcss/DATB/eAE7K8drAAAD3AEp.jef" /><script type="text/javascript" src="/JPM/a4j_3_1_2.GAorg.ajax4jsf.javascript.AjaxScript.jef"> </script><script type="text/javascript" src="/JPM/a4j_3_1_2.GAorg.ajax4jsf.javascript.PrototypeScript.jef"> </script><script type="text/javascript" src="/JPM/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/utils.js.jef"> </script><script type="text/javascript" src="/JPM/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/modalPanel.js.jef"> </script><script type="text/javascript" src="/JPM/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/modalPanelBorders.js.jef"> </script><script type="text/javascript" src="/JPM/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/browser_info.js.jef"> </script><script type="text/javascript" src="/JPM/a4j_3_1_2.GAorg.ajax4jsf.javascript.ImageCacheScript.jef"> </script><script type="text/javascript" src="/JPM/a4j_3_1_2.GAorg/ajax4jsf/javascript/scripts/form.js.jef"> </script><script type="text/javascript" src="/JPM/a4j_3_1_2.GAscripts/tabPanel.js.jef"> </script></head><body><table class="dr-table rich-table" id="pricingConfig:productList" border="0" cellpadding="0" cellspacing="0" rows="5" title="Existing Product Types" width="958"><colgroup span="5"></colgroup><thead><tr class="dr-table-header rich-table-header"><td class="dr-table-headercell rich-table-headercell" id="pricingConfig:productList:_id27"><span class="headerText">Product Name</span></td><td class="dr-table-headercell rich-table-headercell" id="pricingConfig:productList:_id29"><span class="headerText">Description</span></td><td class="dr-table-headercell rich-table-headercell" id="pricingConfig:productList:_id31"><span class="headerText">Pricing Strategy</span></td><td class="dr-table-headercell rich-table-headercell" id="pricingConfig:productList:_id33"><span class="headerText">Creation Date</span></td><td class="dr-table-headercell rich-table-headercell" id="pricingConfig:productList:_id35"><span class="headerText"></span></td></tr></thead><tbody><tr class="dr-table-firstrow rich-table-firstrow" onmouseover="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='#FFFFFF'"><td class="dr-table-cell rich-table-cell col" id="pricingConfig:productList:0:_id37">OUT OF THE BOX PRODUCT</td><td class="dr-table-cell rich-table-cell col" id="pricingConfig:productList:0:_id39">NOT USED FOR ANYTHING</td><td class="dr-table-cell rich-table-cell col" id="pricingConfig:productList:0:_id41"></td><td class="dr-table-cell rich-table-cell col" id="pricingConfig:productList:0:_id43">12/14/2007</td><td class="dr-table-cell rich-table-cell col" id="pricingConfig:productList:0:_id45"><a href="#" onclick="clearFormHiddenParams_pricingConfig('pricingConfig');document.forms['pricingConfig']['pricingConfig:_idcl'].value='pricingConfig:productList:0:_id46';document.forms['pricingConfig']['productID'].value='1'; document.forms['pricingConfig'].submit(); return false;"><img src="/JPM/images/icons/info.gif" alt="View Product Detail" style="border: 0px;" /></a><img class="dr_spr rich-spacer" height="0" id="pricingConfig:productList:0:_id49" src="/JPM/a4j_3_1_2.GAimages/spacer.gif.jef" width="4" /><input id="pricingConfig:productList:0:_id50" name="pricingConfig:productList:0:_id50" onclick="Richfaces.showModalPanel('refreshPage',{left: 'auto'});A4J.AJAX.Submit('_viewRoot','pricingConfig',event,{'parameters':{'pricingConfig:productList:0:_id50':'pricingConfig:productList:0:_id50','productID':1} ,'actionUrl':'/JPM/dashboard.jef','oncomplete':function(request,event,data){Richfaces.hideModalPanel('refreshPage')}} );return false;" alt="Delete this product" type="image" src="images/icons/trash_gray.gif" /></td></tr></tbody></table><div class="dr-dscr rich-datascr" id="pricingConfig:productListDataScroller" style="" onclick="return Richfaces.showModalPanel('refresh');"><table align="center" border="0" cellpadding="0" cellspacing="1" class="dr-dscr-t rich-dtascroller-table" id="pricingConfig:productListDataScroller_table"><tbody><tr><td class="dr-dscr-button-dsbld rich-datascr-button-dsbld dr-dscr-button rich-datascr-button">««</td><td class="dr-dscr-button-dsbld rich-datascr-button-dsbld dr-dscr-button rich-datascr-button">«</td><td class="dr-dscr-button-dsbld rich-datascr-button-dsbld dr-dscr-button rich-datascr-button"></td><td class="dr-dscr-button-dsbld rich-datascr-button-dsbld dr-dscr-button rich-datascr-button"></td><td class="dr-dscr-button-dsbld rich-datascr-button-dsbld dr-dscr-button rich-datascr-button">»</td><td class="dr-dscr-button-dsbld rich-datascr-button-dsbld dr-dscr-button rich-datascr-button">»»</td></tr></tbody></table></div><table id="pricingConfig:productEntry" width="100%"><tbody><tr><td>Product Type:</td><td><input id="pricingConfig:productType" type="text" name="pricingConfig:productType" value="test" class="input1" size="10" /></td></tr><tr><td>Product Description:</td><td><textarea id="pricingConfig:productDescription" name="pricingConfig:productDescription" class="input1" cols="37" rows="5">test</textarea></td></tr><tr><td>Pricing Strategy:</td><td><table id="pricingConfig:pricingStrategyFlag"><tbody><tr><td><label><input type="radio" checked="checked" name="pricingConfig:pricingStrategyFlag" value="PX" /> Primary Exchange</label></td><td><label><input type="radio" name="pricingConfig:pricingStrategyFlag" value="COMP" /> Composite</label></td></tr></tbody></table></td></tr></tbody></table><div class="dr-pnl rich-panel" id="pricingConfig:statusMessage" style="border-style: dotted dashed; text-align: center; color : #FF0000"><div class="dr-pnl-b rich-panel-body" id="pricingConfig:statusMessage_body"><span class="statusMessage"></span></div></div><meta name="Ajax-Update-Ids" content="pricingConfig:productListDataScroller,pricingConfig:productEntry,pricingConfig:productList,pricingConfig:statusMessage" /><span id="ajax-view-state"><input type="hidden" name="com.sun.faces.VIEW" id="com.sun.faces.VIEW" value="_id2" /></span><meta id="Ajax-Response" name="Ajax-Response" content="true" /><span id="org.ajax4jsf.oncomplete">Richfaces.hideModalPanel('refreshPage')</span></body></html> debug[14:48:58,787]: Header Ajax-Expired not found, search in <meta> debug[14:48:58,787]: search for elements by name 'meta' in element #document debug[14:48:58,787]: selectNodes found 2 debug[14:48:58,787]: Find <meta name='Ajax-Update-Ids' content='pricingConfig:productListDataScroller,pricingConfig:productEntry,pricingConfig:productList,pricingConfig:statusMessage'> debug[14:48:58,787]: Find <meta name='Ajax-Response' content='true'> debug[14:48:58,787]: Header Ajax-Update-Ids not found, search in <meta> debug[14:48:58,787]: search for elements by name 'meta' in element #document debug[14:48:58,787]: selectNodes found 2 debug[14:48:58,787]: Find <meta name='Ajax-Update-Ids' content='pricingConfig:productListDataScroller,pricingConfig:productEntry,pricingConfig:productList,pricingConfig:statusMessage'> debug[14:48:58,787]: Update page by list of rendered areas from response pricingConfig:productListDataScroller,pricingConfig:productEntry,pricingConfig:productList,pricingConfig:statusMessage debug[14:48:58,787]: search for elements by name 'script' in element #document debug[14:48:58,787]: selectNodes found 9 debug[14:48:58,803]: <script> in response with src=/JPM/a4j_3_1_2.GAorg.ajax4jsf.javascript.AjaxScript.jef debug[14:48:58,803]: Such element exist in document debug[14:48:58,803]: <script> in response with src=/JPM/a4j_3_1_2.GAorg.ajax4jsf.javascript.PrototypeScript.jef debug[14:48:58,803]: Such element exist in document debug[14:48:58,803]: <script> in response with src=/JPM/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/utils.js.jef debug[14:48:58,803]: Such element exist in document debug[14:48:58,803]: <script> in response with src=/JPM/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/modalPanel.js.jef debug[14:48:58,803]: Such element exist in document debug[14:48:58,803]: <script> in response with src=/JPM/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/modalPanelBorders.js.jef debug[14:48:58,803]: Such element exist in document debug[14:48:58,803]: <script> in response with src=/JPM/a4j_3_1_2.GAorg/richfaces/renderkit/html/scripts/browser_info.js.jef debug[14:48:58,803]: Such element exist in document debug[14:48:58,803]: <script> in response with src=/JPM/a4j_3_1_2.GAorg.ajax4jsf.javascript.ImageCacheScript.jef debug[14:48:58,819]: Such element exist in document debug[14:48:58,819]: <script> in response with src=/JPM/a4j_3_1_2.GAorg/ajax4jsf/javascript/scripts/form.js.jef debug[14:48:58,819]: Such element exist in document debug[14:48:58,819]: <script> in response with src=/JPM/a4j_3_1_2.GAscripts/tabPanel.js.jef debug[14:48:58,819]: Such element exist in document debug[14:48:58,819]: search for elements by name 'link' in element #document debug[14:48:58,819]: selectNodes found 7 debug[14:48:58,819]: <link> in response with src=/JPM/a4j_3_1_2.GAorg/richfaces/renderkit/html/css/modalPanel.xcss/DATB/eAE7K8drAAAD3AEp.jef debug[14:48:58,819]: Such element exist in document debug[14:48:58,819]: <link> in response with src=/JPM/a4j_3_1_2.GAcss/panel.xcss/DATB/eAE7K8drAAAD3AEp.jef debug[14:48:58,819]: Such element exist in document debug[14:48:58,819]: <link> in response with src=/JPM/a4j_3_1_2.GAcss/spacer.xcss/DATB/eAE7K8drAAAD3AEp.jef debug[14:48:58,834]: Such element exist in document debug[14:48:58,834]: <link> in response with src=/JPM/a4j_3_1_2.GAcss/toolBar.xcss/DATB/eAE7K8drAAAD3AEp.jef debug[14:48:58,834]: Such element exist in document debug[14:48:58,834]: <link> in response with src=/JPM/a4j_3_1_2.GAcss/tabPanel.xcss/DATB/eAE7K8drAAAD3AEp.jef debug[14:48:58,834]: Such element exist in document debug[14:48:58,834]: <link> in response with src=/JPM/a4j_3_1_2.GAcss/table.xcss/DATB/eAE7K8drAAAD3AEp.jef debug[14:48:58,834]: Such element exist in document debug[14:48:58,834]: <link> in response with src=/JPM/a4j_3_1_2.GAcss/datascroller.xcss/DATB/eAE7K8drAAAD3AEp.jef debug[14:48:58,834]: Such element exist in document debug[14:48:58,834]: Attempt to update part of page for Id: pricingConfig:productListDataScroller debug[14:48:58,834]: call selectSingleNode for id= pricingConfig:productListDataScroller warn[14:48:58,834]: Node for replace by response with id pricingConfig:productListDataScroller not found in document debug[14:48:58,834]: Attempt to update part of page for Id: pricingConfig:productEntry debug[14:48:58,834]: call selectSingleNode for id= pricingConfig:productEntry debug[14:48:58,850]: Replace content of node by outerHTML() error[14:48:58,850]: Error to clear node content by innerHTML Unknown runtime error debug[14:48:58,850]: search for elements by name 'script' in element table debug[14:48:58,850]: selectNodes found 0 debug[14:48:58,850]: Scripts in updated part count : 0 debug[14:48:58,850]: Update part of page for Id: pricingConfig:productEntry successful debug[14:48:58,850]: Attempt to update part of page for Id: pricingConfig:productList debug[14:48:58,850]: call selectSingleNode for id= pricingConfig:productList warn[14:48:58,850]: Node for replace by response with id pricingConfig:productList not found in document debug[14:48:58,850]: Attempt to update part of page for Id: pricingConfig:statusMessage debug[14:48:58,850]: call selectSingleNode for id= pricingConfig:statusMessage debug[14:48:58,850]: Replace content of node by outerHTML() debug[14:48:58,865]: search for elements by name 'script' in element div debug[14:48:58,865]: selectNodes found 0 debug[14:48:58,865]: Scripts in updated part count : 0 debug[14:48:58,865]: Update part of page for Id: pricingConfig:statusMessage successful debug[14:48:58,865]: call selectSingleNode for id= ajax-view-state debug[14:48:58,865]: Hidden JSF state fields: debug[14:48:58,865]: Namespace for hidden view-state input fields is undefined debug[14:48:58,865]: search for elements by name 'input' in element span debug[14:48:58,865]: selectNodes found 1 debug[14:48:58,865]: Replace value for inputs: 26 by new values: 1 debug[14:48:58,865]: Input in response: com.sun.faces.VIEW debug[14:48:58,865]: Found same input on page with type: hidden debug[14:48:58,865]: Found same input on page with type: hidden debug[14:48:58,881]: search for elements by name 'INPUT' in element span debug[14:48:58,881]: selectNodes found 0 debug[14:48:58,881]: Replace value for inputs: 26 by new values: 0 debug[14:48:58,881]: call selectSingleNode for id= _ajax:data debug[14:48:58,881]: call selectSingleNode for id= _A4J.AJAX.focus debug[14:48:58,881]: No focus information in response debug[14:48:58,897]: call selectSingleNode for id= org.ajax4jsf.oncomplete debug[14:48:58,897]: Call request oncomplete function after processing updates debug[14:48:58,944]: call selectSingleNode for id= _ajax:data
Your help is greatly appreciated!
-Roy