ItEr38S05ValidacionEProbasFuncionaisItEr37S06: creating the binder is only necessary for root.

This causes a speedup
This commit is contained in:
Óscar González Fernández 2009-12-09 20:23:36 +01:00
parent b3ec5e1c54
commit 26a1846e24

View file

@ -21,9 +21,7 @@
package org.navalplanner.web.common;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
@ -75,17 +73,7 @@ public class Util {
return (DataBinder) component.getVariable("binder", false);
}
@SuppressWarnings("unchecked")
public static void createBindingsFor(org.zkoss.zk.ui.Component result) {
List<org.zkoss.zk.ui.Component> children = new ArrayList<org.zkoss.zk.ui.Component>(
result.getChildren());
for (org.zkoss.zk.ui.Component child : children) {
createBindingsFor(child);
}
setBinderFor(result);
}
private static void setBinderFor(org.zkoss.zk.ui.Component result) {
AnnotateDataBinder binder = new AnnotateDataBinder(result, true);
result.setVariable("binder", binder, true);
binder.loadAll();