}
public void doLoad(Widget frmModel, JXPathContext jctx)
throws BindingException {
// Find the repeater and clear it
Repeater repeater = (Repeater)frmModel.getWidget(this.repeaterId);
if (this.clearOnLoad) {
repeater.removeRows();
}
// Move to repeater context
Pointer ptr = jctx.getPointer(this.repeaterPath);
if (ptr.getNode() != null) {
// There are some nodes to load from
JXPathContext repeaterContext = jctx.getRelativeContext(ptr);
// build a jxpath iterator for pointers
Iterator rowPointers = repeaterContext.iteratePointers(this.rowPath);
//iterate through it
int rowNum = 0;
while (rowPointers.hasNext()) {
// Get a row. It is created if needed (depends on clearOnLoad)
Repeater.RepeaterRow thisRow;
if (repeater.getSize() > rowNum) {
thisRow = repeater.getRow(rowNum);
} else {
thisRow = repeater.addRow();
}
rowNum++;
// make a jxpath sub context on the iterated element
Pointer jxp = (Pointer) rowPointers.next();