public void onClick$btnCancelar() { // instalacion = new Instalacion(); almacen = new Almacen(); binder.loadComponent(txtNombre); binder.loadComponent(txtDescripcion); binder.loadComponent(dboxCapacidad); cmbInstalacion.setValue("-Seleccione-"); // binder.loadAll(); }
private void buildDivFieldsFromEntity(ComposerController<?> composer) { // AnnotateDataBinder binder = new AnnotateDataBinder(crudFormWindow); // binder.bindBean("controller2", composer); if (divFields.getChildren().size() == 0) { List<Component> list = new ArrayList<Component>(divFields.getChildren()); for (Component c : list) { c.detach(); } d = new Div(); g = new Grid(); d.appendChild(g); binder = new AnnotateDataBinder(g); binder.bindBean("controller2", composer); Columns c = new Columns(); Column col1 = new Column(); col1.setWidth("120px"); Column col2 = new Column(); col2.setAlign("left"); c.appendChild(col1); c.appendChild(col2); Rows r = new Rows(); Textbox t; Checkbox checkbox; for (ManagedBeanField field : composer.getListColumns()) { if (field.isVisible()) { Row row = new Row(); row.appendChild(new Label(Labels.getLabel(field.getFieldCaption()))); String fieldName = "controller2." + field.getFieldName() + ""; if (field.getFieldType().equalsIgnoreCase("boolean")) { checkbox = new Checkbox(); binder.addBinding(checkbox, "checked", fieldName); row.appendChild(checkbox); } else { t = new Textbox(); t.setWidth("98%"); binder.addBinding(t, "value", fieldName); row.appendChild(t); } r.appendChild(row); } } g.appendChild(r); d.setParent(this.divFields); // binder.loadAll(); } binder.loadComponent(g); // binder.saveAll(); }
@Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); lb_user_org_list.setItemRenderer(new UserOrganizationSearchListitemRenderer()); manageButtons(); btn_back.setHref(globalUtils.getGlobalPropValue(Commons.URL_SECURITY_ADMIN)); comp.setAttribute(comp.getId() + "Control", this, true); binder = new AnnotateDataBinder(comp); binder.loadAll(); }
public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); binder = new AnnotateDataBinder(comp); employeeRequestGroupBox = (Groupbox) comp; GenericValue userLogin = (GenericValue) Executions.getCurrent().getDesktop().getSession().getAttribute("userLogin"); GenericDelegator delegator = (GenericDelegator) userLogin.getDelegator(); String partyId = (String) userLogin.getString("partyId"); this.assignedRequestTypeList = getAssignedRequsetType(delegator, partyId); binder.loadAttribute(requestTypeViewListbox, "model"); }