This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Suppose you have a repeat control bound to the result of SSJS code that executes the following SQL:
"SELECT * from endusers WHERE clue > 0"
If you wanted, for example, to allow users to resort the repeat using links above the repeat, you could bind an event to each link to set an "ORDER BY" value:
viewScope.put("repeatSortColumn", "firstName");
In the code your repeat is bound to, then, you could do something like this:
var SQL = "SELECT * from endusers WHERE clue > 0 ORDER BY " + (viewScope.get("repeatSortColumn") || "1");
With this approach, when the page originally loads, the repeat will sort by the first column returned from the query, but when a user clicks a resort link the repeat will be resorted by the corresponding column.
Feedback response number WEBB7V3R6W created by ~Arnold Minreternivu on 08/19/2009