3 Replies Latest reply on May 11, 2009 12:09 PM by Albert Scholtz

    EJBQL and seam-gen orderColumn sort parameter on pages

    Albert Scholtz Newbie
      Hi,

      I have the following:

      @Override
      public String getEjbql() {
           return "select partnerHandsets from PartnerHandsets partnerHandsets join partnerHandsets.partners";
              }

      I get back a result which contains the partnerHandsets.name column and the partners.name column.

      My question is how to differentiate on the page between these two columns when using sort and orderColumn. I have the following:

      <s:link styleClass="columnHeader" value="partners name #{partnerHandsetsList.orderColumn=='name' ? ( partnerHandsetsList.orderDirection=='desc' ? messages.down : messages.up)  : '' }">
           <f:param name="sort" value="name" />
           <f:param name="dir" value="#{partnerHandsetsList.orderDirection=='asc' ? 'desc' :       'asc'}"/>
      </s:link>

      Were partnerHandsetsList.orderColumn=='name' is, I cannot use partnerHandsetsList.orderColumn=='partners.name'

      Can you advise on an approach? Please shout if you need more info.

      Cheers
      Albert