-
1. Re: Problem with suggestionBox
njtom Jun 9, 2010 1:38 PM (in response to njtom)Bump. Any ideas about the event not firing?
-
2. Re: Problem with suggestionBox
ilya_shaikovsky Jun 10, 2010 5:09 AM (in response to njtom)1 of 1 people found this helpful1) check 3.3.3Final.
2) remove just to check all immediate attributes.
-
3. Re: Problem with suggestionBox
njtom Jun 10, 2010 8:55 PM (in response to ilya_shaikovsky)Hi, I did a little more checking, and I discovered the following error in my Firefox error console whenever I select something from the suggestion list:
Error: this._form is null
Source File: xxxxxxx/a4j/g/3_2_2.SR1org.ajax4jsf.javascript.AjaxScript
Line: 178elem=document.getElementById(targetID+".stop");if(elem){elem.style.display="";if(typeof(elem.onstop)=='function'){elem.onstop();}}}}catch(e){LOG.error("Exception on status change: ");}};A4J.Query=function(containerId,form){this._query={AJAXREQUEST:containerId};this._oldSubmit=null;this._form=form;this._actionUrl=(this._form.action)?this._form.action:this._form;};A4J.Query.prototype={_form:null,_actionUrl:null,_ext:"",_query:{},_oldSubmit:null,_pageBase:window.location.protocol+"//"+window.location.host,hidden:function(control){this._value_query(control);if((control.name.length>4)&&(control.name.lastIndexOf("_idcl")==(control.name.length-5))){control.value="";}else if((control.name.length>12)&&(control.name.lastIndexOf("_link_hidden_")==(control.name.length-13))){control.value="";}},text:function(control){this._value_query(control);},textarea:function(control){this._value_query(control);},'select-one':function(control){if(control.selectedIndex!=-1){this._value_query(control);}},password:function(control){this._value_query(control);},file:function(control){this._value_query(control);},radio:function(control){this._check_query(control);},checkbox:function(control){this._check_query(control);},'select-multiple':function(control){var cname=control.name;var options=control.options;for(var i=0;i<control.length;i++){var option=options[i];this._addOption(cname,option);}},_addOption:function(cname,option){if(option.selected){if(!this._query[cname]){this._query[cname]=[];}
And, if I use a4j:log, as soon as I click on the suggested value, the log adds the following:
debug[20:51:26,399]: Have Event [object Object] with properties: target: [object HTMLTableCellElement], srcElement: undefined, type: clickdebug[20:51:26,399]: NEW AJAX REQUEST !!! with form :mainbodyForm:priceForm -
4. Re: Problem with suggestionBox
ilya_shaikovsky Jun 11, 2010 2:28 AM (in response to njtom)please attach real not simplified page snippet. also check that forms present for all submitting components and that not forms nested.
-
5. Re: Problem with suggestionBox
njtom Jun 11, 2010 8:51 AM (in response to ilya_shaikovsky)Nested forms! That was the problem. Our pages use a template as follows:
<ui:composition template="template.xhtml">
<ui:param name="title" value="IBI Price Calculator"/>
<ui:define name="mainmenu"></ui:define>
<ui:define name="mainbody">
<rich:messages layout="list" ajaxRendered="true"
infoClass="infoMessage"
warnClass="errorMessage"
errorClass="errorMessage"
fatalClass="errorMessage" />In template.xhtml:
<div>
<h:form id="mainbodyForm">
<ui:insert name="mainbody">content</ui:insert>
</h:form>
</div>My page also had a form. I hadn't realized that I was introducing a nested form because of the template. Once I removed my form tags, everything worked.
Thank you for the 'nested form' hint!