0 Replies Latest reply on Oct 20, 2012 3:09 PM by James Camerun

    simple suggestionbox question

    James Camerun Newbie

      Hello,

       

      i want to use suggestionbox on a edit form and show selected user first name and last name. my code is below and actulally is working.

       

      <h:inputText  id="journalist-suggestion-input" value="#{onlyPhotoNewsManager.journalist.firstName} #{onlyPhotoNewsManager.journalist.lastName}"></h:inputText>

            <a4j:region  id="suggest-box">

                  <rich:suggestionbox for="journalist-suggestion-input" suggestionAction="#{onlyPhotoNewsManager.suggestJournalist}" var="result"

                                                fetchValue="#{result.firstName} #{result.lastName}" requestDelay="200"

                                                minChars="2" shadowOpacity="4" border="3" width="300"

                                                height="150" shadowDepth="4" cellpadding="4"

                                                nothingLabel="Nothing..." columnClasses="left" limitToList="true" reRender="suggest-box">

                                               

                                              <h:column>

                                                   <h:outputText value="#{result.name}" />

                                              </h:column>

                                               <h:column>

                                                    <h:outputText value="#{result.firstName}" />

                                               </h:column>

                                               <h:column>

                                                    <h:outputText value="#{result.lastName}" />

                                               </h:column>

                                               <h:column>

                                                    <h:outputText value="#{result.domain}" />

                                               </h:column>

                       

                          <a4j:support ajaxSingle="true" event="onselect" >

                             <f:setPropertyActionListener value="#{result}" target="#{onlyPhotoNewsManager.journalist}" />

                          </a4j:support>

              </rich:suggestionbox>

       

      this is not working and got error "value="#{onlyPhotoNewsManager.journalist.firstName} #{onlyPhotoNewsManager.journalist.lastName}": Illegal Syntax for Set Operation"

       

      when i changed inputtext value to only #{onlyPhotoNewsManager.journalist.firstName} it is working without error. But i need to show user firstname and lastname together. how can i do that?