1 Reply Latest reply on May 7, 2008 4:00 PM by T Rixom

    Selecting item from list

    T Rixom Newbie


      I am trying to get the following scenario working:

      Start a conversation
      Show a list of information
      Select an item from list
      Execute actions on this item (within the conversation)

      I have tried using the scrollableDatatable but ran into a problem that to get it to work you need to bind it to a backing bean. This however cannot work in a conversation, so all the actions I try to use that require items from the conversation fail...

      I have tried using the orderingList and activeitem but this has a lot of issues when using different browsers.

      Could someone point me in the right direction?



        • 1. Re: Selecting item from list
          T Rixom Newbie

          Somehow just posting here always seems to help:

          This is how I got it working:

          basically i use the xxxList.java object generated by seam-gen.

          I add the following items:

          private Country selectedCountry;
          public Country getSelectedCountry()
             return this.selectedCountry;
          public void setSelectedCountry(Country selectedCountry)
             this.selectedCountry = selectedCountry;

          in the List.xhtml I have the following (parentList is CountryList):

               rendered="#{not empty parentList.resultList}">
                    reRender="countryMenuPanel, countrySubPanel" />
                    <f:facet name="header">
                         <s:link styleClass="columnHeader"
                              value="#{messages.id} #{parentList.order=='country.id asc' ? messages.down : ( parentList.order=='country.id desc' ? messages.up : '' )}">
                              <f:param name="countryOrder"
                                   value="#{parentList.order=='country.id asc' ? 'country.id desc' : 'country.id asc'}" />
                    <h:outputText value="#{country.id}" />

          The panels that are rerendered are used to display the subobjects of the selected object and a menu in which I can delete and edit the selected object.