This forum is closed to new posts and
responses. The content has been migrated to the Digital Solutions Community. Please join us there for new content as well as this content. For customer support, please visit 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