0 Replies Latest reply on Nov 19, 2014 4:57 AM by Asim Shaikh

    How to Add Sorting to Columns from another List

    Asim Shaikh Novice

      I have Column Named CaseNo in Table EventMaster  (It is concatenation of Case No "of " Year I am fetching CaseNo from CaseMaster and Year from YearMaster ) .Now I wanted to Sort this column How can I achieve this .


      <rich:dataTable value="#{eventMaster.eventMasterList}" var="event" id="table"

                                                                      rows="10" rowClasses="even-row, odd-row ">

                                                          <rich:column  style="width:7%;">

                                                              <f:facet name="header">#{lbl['label.casenumber']}</f:facet>

                                                              <h:outputText value="#{event.caseNo}"/>



                                                          <rich:column style="width:12%;">

                                                              <f:facet name="header">#{lbl['label.scheduleevent']}</f:facet>

                                                              <h:outputText value="#{event.eventDateString}"/>



      Criteria crt = session.createCriteria(merc.dao.EventMasterDao.class).add(Restrictions.eq("isDeleted", "N")).addOrder(Order.asc("eventDate"));

                  fetchList = (ArrayList<EventMasterDao>) crt.list();