-
1. Re: RichFaces SuggestionBox cursor problem
sergeysmirnov Apr 24, 2007 12:19 PM (in response to 1kaa)livedemo still contains example of Richfaces 3.0.0
I have just checked the latest snapshot. The problem is not reproducible there. Try -
2. Re: RichFaces SuggestionBox cursor problem
1kaa Apr 25, 2007 4:01 AM (in response to 1kaa)Hi Sergey,
Thanks for the advice. I've tried the latest snapshot of RichFaces and Ajax4JSF (2007/04/24). However when I try to use the SuggestionBox I get a Javascript error.
Firebug seems to suggest that line 48 in suggestionbox.js is at fault. The variable options is undefined. Has there been a change in the component definition?
Any suggestions gratefully received. In the meantime, I'll try a different snapshot, just in case the latest is broken.
Line 48 is :
Exadel.Suggestion=Class.create();Object.extend(Object.extend(Exadel.Suggestion.prototype,Suggestion.Base.prototype),
{initialize:function(containerId,actionUrl,element,content,onsubmit,options)
{var update=options.popup||'ac1update';
if(!$(update))this.create(element,update,content,options);
this.baseInitialize(element,update,options);this.options.asynchronous=true;
this.options.onajaxcomplete=options.oncomplete;
this.options.oncomplete=this.onComplete.bind(this);
this.options.defaultParams=this.options.parameters||null;
this.content=content;this.containerId=containerId;this.actionUrl=actionUrl;
this.input=$(element);this.oldValue=$(element).value;
if(onsubmit&&onsubmit!='null'){this.onsubmitFunction=new Function(onsubmit).bind(this.input);}
I'm using the following jsp snippet which worked ok in 3.0.0:<a4j:region id="supplierAjax"> <h:column> <h:inputText id="supplierCode" value="#{viewForecastEDIHandler.supplierCode}" maxlength="6" size="6"> </h:inputText> </h:column> <rich:suggestionbox id="supplierSuggest" for="supplierCode" immediate="true" suggestionAction="#{supplierSuggestHandler.autocompleteSupplier}" width="330" height="150" var="sc" minChars="2" frequency="1" ignoreDupResponses="true" fetchValue="#{sc.supplierCode}" frequency="1"> <h:column> <h:outputText value="#{sc.supplierCode}: #{sc.companyName}" /> </h:column> </rich:suggestionbox> </a4j:region>
-
3. Re: RichFaces SuggestionBox cursor problem
1kaa Apr 25, 2007 5:29 AM (in response to 1kaa)The javascript error still appears in the builds from 2007/04/15.
I tried the latest a4j snapshot with Richfaces 3.0.0., whilst there was no javascript error, the stuck cursor problem is still there. -
4. Re: RichFaces SuggestionBox cursor problem
1kaa Apr 26, 2007 3:19 AM (in response to 1kaa)"1kaa" wrote:
... However when I try to use the SuggestionBox I get a Javascript error...
Scratch that. I'd overridden the Suggestion Box renderer to fix the old JDK1.5 issue and not removed this code. Sorry.
As you noted, the cursor problem works fine in the latest code.
Regards,
Karl. -
5. Re: RichFaces SuggestionBox cursor problem
mirceapop May 10, 2007 5:31 AM (in response to 1kaa)Hi,
I have a question related to suggestionBox:
I have 3 input fields: Country, Region and City. What I want is that if I select A country then in the region suggest only the regions for that country to suggest. Same for the City.
The problem what I am facing is that on the server side I don't get the value of the previous field.
Ex: I select USA in the first field.
then on the region field - on the server I don't get USA in the value of the bean.
I'm using request beans. Is there a way to tell suggestion to submit also the values already selected?
I can't use session beans.
Regards,
Mircea -
6. Re: RichFaces SuggestionBox cursor problem
ilya_shaikovsky May 10, 2007 6:26 AM (in response to 1kaa)Use ajaxSingle="false" on the suggestionBox component. So all other inputs will be submitted also.