0 Replies Latest reply on May 5, 2008 1:59 PM by Michael Griffith

    Conditionally Disable Suggestionbox?

    Michael Griffith Newbie

      Hello All,

      I have a suggestionbox that I want to be able to disable, if a user indicates they don't want to use suggestions (via a checkbox on the form). The problem is some of the users like the behavior and some don't. Can someone point out what is wrong with the code below?

       <s:decorate template="layout/display.xhtml">
       <ui:define name="label">Use Suggestion Box:</ui:define>
       <h:selectBooleanCheckbox id="useSuggestions" title="useSuggestions" value="true"/>
       <s:decorate template="layout/display.xhtml">
       <ui:define name="label">Point Person</ui:define>
       <h:inputText id="pointPerson" value="#{actionList.action.pointPerson}"/>
       <rich:suggestionbox id="pointPersonSuggestionBoxId" ajaxSingle="true" width="500" height="300" rendered="#{useSuggestions}"
       for="pointPerson" suggestionAction="#{suggestBox.suggestActionPointPerson}" var="anAction">
       <h:outputText value="#{anAction}" />

      Thanks in advance for any suggestions (sorry for blatant pun!)