};
commands[CLIENT.ordinal()] = new RendererCommand() {
public void encodeMarkup(ResponseWriter writer, FacesContext context,
UISortableControl control) throws IOException {
UIDataAdaptor table = control.getTable();
String sortBy = null;
ValueExpression sortExpression = control.getSortExpression();
if (sortExpression != null) {
sortBy = sortExpression.getExpressionString();
}
JSFunction function = new JSFunction("new RichFaces.SortControl");
function.addParameter(control.getClientId(context));
function.addParameter(table.getClientId(context));
function.addParameter(sortBy == null ? JSReference.NULL: new JSReference(sortBy));
function.addParameter(control.getParent().getClientId(context));
writeScript(context, control, function);
}
};