0 Replies Latest reply on Dec 8, 2009 6:20 PM by Paul Sasel

    Default Sort Order in scrollableDataTable

    Paul Sasel Newbie
      Hi everybody,

      I'm new to Seam and currently I'm facing a problem with the UI element "scrollableDataTable". The table shows two columns, one with the a UserID another one with the user's mail address. Clicking on the header of the column should sort the column. So far everything works, however I don't manage to set the default sort order to the column UserId. Can anybody help me out? You can find the current implementation below:

      <rich:scrollableDataTable value="#{overviewContext.userList}" var="user" sortMode="single" height="254px;"
                          width="325px" sortBy="#{user.accountName}">
        <a4j:support action="#{overviewAction.selectUser(user)}" event="onRowClick" reRender="userButtons, userDetails" />
        <rich:column width="120px" sortExpression="#{user.accountName}">
          <f:facet name="header">${messages['user.userId']}</f:facet>
          <h:outputText value="#{user.accountName}" />
        </rich:column>
        <rich:column width="200px" sortExpression="#{user.mail}">
          <f:facet name="header">${messages['user.mail']}</f:facet>
          <h:outputText value="#{user.mail}" />
        </rich:column>
      </rich:scrollableDataTable>

      Thanks in advance,
      Paul