3 Replies Latest reply on Nov 30, 2009 2:19 PM by Mohammad Jaber

    extendedDataTable  selection

    Mohammad Jaber Newbie

      Hi,

      i have an extendedDataTable that is defined to have single selection, and i have the selection attribute associated with a SimpleSelection object on my back bean, now what i do is select a record from the table by clicking the record then click an operation button (h:commandButton with action attribute), i check the selection property to get the selected records but its always empty i have checked that my extendedDataTable is surrounded with form .. what i'm missing

        • 1. Re: extendedDataTable  selection
          Ilya Shaikovsky Master

          http://livedemo.exadel.com/richfaces-demo/richfaces/extendedDataTable.jsf

          change select box for selection to single and verify.

          for your case - add rich:messages to page. If some messages occurs - correct conversion problems from the beginning.

          If no messages will be risen - please show the code you using.

          • 2. Re: extendedDataTable  selection
            Mohammad Jaber Newbie

            i tried the single and the multi selection mode and its the same issue.

            <h:panelGrid width="100%">
            <rich:extendedDataTable selectionMode="single" selection="#{nationalities.selectedNationalityCodes}" id="nationalitiesTable" value="#{nationalities.wrappedSearchResult}" var="nationality" width="100%" height="300px">
            <f:facet name="header"><h:outputText value="#{labels.searchResults}"></h:outputText></f:facet>

            <rich:column>
            <f:facet name="header">
            <h:outputText value="#{labels.nationalityCode}"></h:outputText>
            </f:facet>

            <h:outputText value="#{nationality.nationalityCodeEntity.natCode}"></h:outputText>
            </rich:column>

            <rich:column>
            <f:facet name="header">
            <h:outputText value="#{labels.nationalityAdesc}"></h:outputText>
            </f:facet>

            <h:outputText value="#{nationality.nationalityCodeEntity.natAdesc}"></h:outputText>
            </rich:column>

            <rich:column>
            <f:facet name="header" >
            <h:outputText value="#{labels.nationalityEdesc}"></h:outputText>
            </f:facet>

            <h:outputText value="#{nationality.nationalityCodeEntity.natEdesc}"></h:outputText>
            </rich:column>

            </rich:extendedDataTable>

            </h:panelGrid>


            • 3. Re: extendedDataTable  selection
              Mohammad Jaber Newbie

              Thaks ilya,

              i figured out my problem, i have some action based events to populate my data table, hence the table at the time of the the action "which is suppose to get the selected row" is empty ...