1 Reply Latest reply on Jul 8, 2009 3:35 PM by Clarance Howatt

    RichFaces SuggestionBox GettingAdditionalProperties not work

    Clarance Howatt Newbie

      Getting additional properties from a richfaces suggestionBox does not seem to work inside a modalPanal

      This works as expected


      <div id="addConditionsPanelDiv_2">
       <h:panelGrid columns="2" width="250">
       <h:panelGroup style="width: 75px;" styleClass="rightAligned">
       <h:outputLabel for="newConditionSelectionInput_2" value="Conditions:" />
       </h:panelGroup>
       <h:panelGroup>
       <h:inputText style="width: 150px;" value="#{permitConditionAction.shortDescription}"
       id="newConditionSelectionInput_2">
       </h:inputText>
       <rich:suggestionbox id="suggestionbox_2" zindex="3000"
       for="newConditionSelectionInput_2" width="150" suggestionAction="#{permitConditionAction.autocomplete}"
       nothingLabel="No values found"
       var="var">
       <h:column>
       <h:outputText value="#{var.shortDescription}" />
       </h:column>
       <a4j:support event="onselect" action="#{permitConditionAction.setDescription(var.description)}" />
       </rich:suggestionbox>
       </h:panelGroup>
       </h:panelGrid>
      </div>
      




      But this does not


      <rich:modalPanel id="addConditionsPanelID" zindex="2000" resizeable="true" width="600">
       <f:facet name="header">
       <h:panelGroup>
       <h:outputText value="#{msgs['permit.condition.modalName']}" />
       </h:panelGroup>
       </f:facet>
       <div id="addConditionsPanelDiv">
       <h:panelGrid columns="2" width="250">
       <h:panelGroup style="width: 75px;" styleClass="rightAligned">
       <h:outputLabel for="newConditionSelectionInput" value="Conditions:" />
       </h:panelGroup>
       <h:panelGroup>
       <h:inputText style="width: 150px;" value="#{permitConditionAction.shortDescription}"
       id="newConditionSelectionInput">
       </h:inputText>
       <rich:suggestionbox id="suggestionbox" zindex="3000" for="newConditionSelectionInput" width="150" suggestionAction="#{permitConditionAction.autocomplete}"
       nothingLabel="No values found" ajaxSingle="true" var="var">
       <h:column>
       <h:outputText value="#{var.shortDescription}" />
       </h:column>
       <a4j:support event="onselect" action="#{permitConditionAction.setCurrentCondition(var)}" />
       </rich:suggestionbox>
       </h:panelGroup>
       </h:panelGrid>
       </div>
      </rich:modalPanel>
      




      In the first case, the variable 'var' is populated as expected. In the second case the variable 'var' is null.

      Is this a bug or am I doing something wrong?