return null;
}
public void jsFunction_removeRow(Object obj) throws JavaScriptException {
if (delegate instanceof Repeater) {
Repeater repeater = (Repeater)delegate;
if (obj instanceof Function) {
Function fun = (Function)obj;
int len = repeater.getSize();
boolean[] index = new boolean[len];
Object[] args = new Object[1];
Scriptable scope = getTopLevelScope(this);
Scriptable thisObj = scope;
Context cx = Context.getCurrentContext();
for (int i = 0; i < len; i++) {
ScriptableWidget row = wrap(repeater.getRow(i));
args[0] = row;
Object result = fun.call(cx, scope, thisObj, args);
index[i] = Context.toBoolean(result);
}
for (int i = len-1; i >= 0; --i) {
if (index[i]) {
deleteRow(repeater, i);
}
}
} else if (obj instanceof Number) {
int index = (int)Context.toNumber(obj);
if (index > 0 && index < repeater.getSize()) {
deleteRow(repeater, index);
}
} else {
//...
}