1 2 Previous Next 20 Replies Latest reply on Dec 18, 2007 6:59 PM by cyberanto

    Suggestionbox: Setting the selected row/value in serverside

    Martin Taal Newbie

      I am having trouble getting the selected row/value of a suggestionbox in a serverside bean. There are several posts about this on the forum. In one of the posts, a solution using the onselect event was proposed by ilya_shaikovsky. I tried this but I only get null values send to the server (when the onselect event fires). Is there something wrong with my code (see below)?
      btw, I use seam 2.0ga and the richfaces version distributed with seam 2.0ga.


      gr. Martin

      <s:decorate id="bookAuthorDecoration"
       <ui:define name="label">#{messages['Book.author']}</ui:define>
       <h:panelGrid columns="3">
       <h:inputText id="bookAuthor"
       value="#{entityHome.instance.author.Identifier}" size="25"
       maxlength="50" disabled="#{entityHome.formMode=='delete'}"
       <rich:spacer width="5"/>
       <h:outputText value="#{entityHome.instance.author.Description}" />
       <rich:suggestionbox id="bookAuthorSuggestion" for="bookAuthor"
       ajaxSingle="true" selfRendered="true"
       focus="bookISBN" eventsQueue="bookAuthorSuggestion"
       suggestionAction="#{suggestion.get('bookAuthorSuggestion', entityHome.instance, 'author', 'name', '100').autoComplete}"
       var="row" fetchValue="#{row.Identifier}" minChars="2">
       <h:outputText value="#{row.Title}" />
       <a4j:support event="onselect" actionListener="#{entityHome.doIt}" reRender="bookAuthorDecoration">
       <f:setPropertyActionListener value="#{row.Title}"
       target="#{entityHome.suggestionValue}" />

        1 2 Previous Next