Monday, May 4, 2009

Difference between setOrder and setOrderColumn in Seam

Difference between setOrder and setOrderColumn in Seam


 

  1. This code work fine.

programList.setOrder("program.programName asc, program.programId desc");

  1. The below code snippet won't work –
    1. programList.setOrderColumn("program.programName asc, program.programId desc");
    2. programList.setOrderColumn("program.programName asc);

      It throws the following exceptions - Caused by java.lang.IllegalArgumentException with message: "invalid order column ("program.programName asc, program.programId desc" must match the regular expression "^\w+(\.\w+)*$")"

    3. This works fine - programList.setOrderColumn("program.programName");
      1. But we have to set

        customerList.setOrderDirection("asc"); or customerList.setOrderDirection("desc");

No comments: