-
1. Re: How to disable richfaces:suggestionBox?
jimk1723 May 9, 2008 2:33 AM (in response to griffitm.michael.griffith.fda.hhs.gov)It might be easier to use Ajax4JSF than to do this on the client side:
<a4j:outputPanel id="suggestionPanel" > <h:selectBooleanCheckbox id="disableCheckBox" value="#{example.suggestionDisabled}" > <a4j:support reRender="suggestionPanel" event="click"/> </h:selectBooleanCheckbox> <h:outputText value="Disable auto suggest?"/> <rich:suggestionbox id="pointPersonSuggestionBoxId" ajaxSingle="true" width="500" height="300" minChars="4" disabled="#{example.suggestionDisabled}" for="pointPerson" suggestionAction="#{suggestBox.suggestActionPointPerson}" var="anAction"> <h:column> <h:outputText value="#{anAction}" /> </h:column> </rich:suggestionbox> </a4j:outputPanel>
The example component in this case has a single boolean property suggestionDisabled to store the disabled state of the suggestion box.
-
2. Re: How to disable richfaces:suggestionBox?
jimk1723 May 9, 2008 2:35 AM (in response to griffitm.michael.griffith.fda.hhs.gov)Er, the event attribute on that a4j:support element is probably wrong. It might need to be onclick.
-
3. Re: How to disable richfaces:suggestionBox?
griffitm.michael.griffith.fda.hhs.gov May 9, 2008 4:09 PM (in response to griffitm.michael.griffith.fda.hhs.gov)James,
Thanks for the reply. When I try to use the suggestionbox insude of the a4j:outputPanel, the suggestionProperty is not found. I get an exception like:
javax.el.PropertyNotFoundException: Property 'suggestActionPointPerson' not found on type org.javassist.tmp.java.lang.Object_$$_javassist_7 at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193) at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:170) at javax.el.BeanELResolver.property(BeanELResolver.java:279) at javax.el.BeanELResolver.getValue(BeanELResolver.java:60) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53) at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
Your approach seems like the right way to go about this, Any idea what the exception is about?
James Kelly wrote on May 09, 2008 02:33 AM:
It might be easier to use Ajax4JSF than to do this on the client side:<a4j:outputPanel id="suggestionPanel" > <h:selectBooleanCheckbox id="disableCheckBox" value="#{example.suggestionDisabled}" > <a4j:support reRender="suggestionPanel" event="click"/> </h:selectBooleanCheckbox> <h:outputText value="Disable auto suggest?"/> <rich:suggestionbox id="pointPersonSuggestionBoxId" ajaxSingle="true" width="500" height="300" minChars="4" disabled="#{example.suggestionDisabled}" for="pointPerson" suggestionAction="#{suggestBox.suggestActionPointPerson}" var="anAction"> <h:column> <h:outputText value="#{anAction}" /> </h:column> </rich:suggestionbox> </a4j:outputPanel>
The example component in this case has a single boolean property suggestionDisabled to store the disabled state of the suggestion box.Click HELP for text formatting instructions. Then edit this text and check the preview.
-
4. Re: How to disable richfaces:suggestionBox?
griffitm.michael.griffith.fda.hhs.gov May 9, 2008 5:21 PM (in response to griffitm.michael.griffith.fda.hhs.gov)James,
I had a typo on my component/attribute name. Your suggestion works great, thanks for such a GOOD example.
Cheers!
MG
-
5. Re: How to disable richfaces:suggestionBox?
marcmanonlyme Oct 20, 2009 8:28 PM (in response to griffitm.michael.griffith.fda.hhs.gov)Hello there,
I'm trying to disable rich:suggestionBox for exactly the same reason and I found this thread, but there is one thing I'm confused about.
You are talking about adisabled
property on the rich:suggestionBox which does not exists for as much as my research lead me to. So I'd like to ask you What version of richfaces are you using??? Did you tune up or modified anything to get it?? Am I missing something too obvious here???
I'll appreciate any help here and thank you in advance.MR