- import java.text.DecimalFormat;
- import java.text.ParseException;
- import java.util.List;
-
- import org.zkoss.zk.ui.Component;
- import org.zkoss.zk.ui.util.GenericAutowireComposer;
- import org.zkoss.zkplus.databind.AnnotateDataBinder;
- import org.zkoss.zkplus.databind.DataBinder;
-
- import com.linktel.common.web.zk.converter.SexRadiogroupConverter;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- abstract public class GenericDataBinderComposer extends GenericAutowireComposer {
- private static final long serialVersionUID = -8962566563467903754L;
- protected DataBinder binder;
-
- @Override
- public void doAfterCompose(Component comp) throws Exception {
- super.doAfterCompose(comp);
- binder = new AnnotateDataBinder(comp);
- comp.setAttribute("binder", binder);
- }
-
- protected void loadAll() {
- binder.loadAll();
- }
-
- protected void loadAttribute(Component comp, String attr) {
- binder.loadAttribute(comp, attr);
- }
-
- protected void loadComponent(Component comp) {
- binder.loadComponent(comp);
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- protected void addBinding(Component comp, String attr, String expr,
- String loadWhenEvent, String saveWhenEvent, String access,
- String converter) {
- if (loadWhenEvent != null && "".equals(loadWhenEvent.trim())) {
- binder.addBinding(comp, attr, expr, (List) null, saveWhenEvent,
- access, converter);
- } else {
- binder.addBinding(comp, attr, expr, new String[] { loadWhenEvent },
- saveWhenEvent, access, converter);
- }
-
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-