public AddNodeWindow(AbstractQuestionRelation p) { this.setParent(p); // create ui from template Executions.createComponents("/WEB-INF/zk/survey/design/AddNodeWindow.zul", this, null); Selectors.wireVariables(this, this, Selectors.newVariableResolvers(getClass(), Div.class)); Selectors.wireComponents(this, this, false); Selectors.wireEventListeners(this, this); // type box and default selection ntds = nodeRO.getNodeTypeDescriptions(); ListModelList<String> typeModel = new ListModelList<String>(); for (Map<String, String> ntd : ntds) { String nodeTypeLabel = ntd.get("label"); typeModel.add(nodeTypeLabel); } String defaultContactType = p.getQuestion().getDefaultNewContactType(); if (defaultContactType != null) { Map<String, String> ntd = GeneralUtil.getNodeDescription(ntds, defaultContactType); if (ntd != null) { String nodeTypeLabel = ntd.get("label"); typeModel.addToSelection(nodeTypeLabel); } } typeBox.setModel(typeModel); onNodeTypeChanged(); this.setWidth("200px"); this.setVflex("1"); this.setClosable(true); }
private void processRecursive(Component comp, Object composer) { Selectors.wireComponents(comp, composer, false); Selectors.wireEventListeners(comp, composer); List<Component> compList = comp.getChildren(); for (Component vComp : compList) { if (vComp instanceof Window) { processRecursive(vComp, composer); } } }
@AfterCompose public void doAfterCompose( @ContextParam(ContextType.VIEW) Component view, @ExecutionArgParam("map") Map<String, Object> parameters) { Selectors.wireComponents(view, this, false); this.view = view; userName = FHSessionUtil.getCurrentUser().getUserLoginID(); listBoxViewModel = new ListboxViewModel(); allReordsInDB = new ListModelList<>(); getDataRecordList(); for (Jobdetails up : allReords) { allReordsInDB.add(up); } // allReordsInDB.setMultiple(true); listBoxViewModel.setModel(allReordsInDB); // loadUserTabs(); if (usertabs != null && listBoxViewModel.getModel().size() > 0) { if (selectedItem != null) loadDetailPageTab(selectedItem); else { selectedItem = new Jobdetails(); loadDetailPageTab(selectedItem); } } else { selectedItem = new Jobdetails(); loadDetailPageTab(selectedItem); } }
@Init public void init( @ContextParam(ContextType.VIEW) Component view, @ExecutionArgParam("apelacionestudiante") List<ApelacionEstadoApelacion> v3, @ExecutionArgParam("apelacionestudianteinstancia2") List<ApelacionEstadoApelacion> v4, @ExecutionArgParam("apelacionestudianteinstancia3") List<ApelacionEstadoApelacion> v5, @ExecutionArgParam("apelacion") List<SolicitudApelacion> v1, @ExecutionArgParam("estudiante") List<EstudianteSancionado> v2, @ExecutionArgParam("cedula") String v6, @ExecutionArgParam("codigoLapso") String v7, @ExecutionArgParam("motivosEstudiante") String v8, @ExecutionArgParam("caso") String v9) // initialization code { Selectors.wireComponents(view, this, false); this.apelacionestudiante = v3; this.apelacionestudianteinstancia2 = v4; this.apelacionestudianteinstancia3 = v5; this.apelacion = v1; this.estudiante = v2; this.cedula = v6; this.codigoLapso = v7; this.motivosEstudiante = v8; this.caso = v9; }
@AfterCompose public void doAfterCompose(@ContextParam(ContextType.VIEW) Component view) throws Exception { Selectors.wireComponents(view, this, false); String id = Executions.getCurrent().getParameter("id"); if (id != null) { Date currentDate = Calendar.getInstance().getTime(); bandinfoMonth.setDate(currentDate); bandinfoYear.setDate(currentDate); Project Project = (Project) new WorkWithProject().getEntity(new Integer(id)); discrName = "Для проекта: " + Project.getName(); ParseCorrection parseCorrection = new ParseCorrection(); Object[] o = Project.getCorrectionsProject().toArray(); CorrectionsProject[] cor = new CorrectionsProject[o.length]; for (int i = 0; i < o.length; i++) cor[i] = (CorrectionsProject) o[i]; parseCorrection.getModelByCorrection(cor); bandinfoMonth.setModel(parseCorrection.getModelByCorrection(cor)); bandinfoYear.setModel(parseCorrection.getModelByCorrection(cor)); setDataInChart(); } }
/** * inicialización * * @param init * @return código de inicialización * @throws No dispara ninguna excepcion. */ @Init public void init( @ContextParam(ContextType.VIEW) Component view, @ExecutionArgParam("estudiante") Estudiante v1) { Selectors.wireComponents(view, this, false); this.estudiante = v1; System.out.println("recibe" + estudiante); cedula = estudiante.getCedulaEstudiante(); nombre = estudiante.getPrimerNombre(); segundoNombre = estudiante.getSegundoNombre(); apellido = estudiante.getPrimerApellido(); segundoApellido = estudiante.getSegundoApellido(); concatenacionNombres(); concatenacionApellidos(); buscarApelacion(cedula); buscarAsignaturas(); String fecha = estudiante.getAnioIngreso().toString(); String separador = " "; if (!fecha.equals("")) { String[] palabraArray = fecha.split(separador); fechaIngreso = palabraArray[0]; } String fecha1 = estudiante.getFechaNacimiento().toString(); String separador1 = " "; if (!fecha1.equals("")) { String[] palabraArray1 = fecha1.split(separador1); fechaNacimiento = palabraArray1[0]; } }
@Init public void init(@ContextParam(ContextType.VIEW) org.zkoss.zk.ui.Component view) { Selectors.wireComponents(view, this, false); availableModule = service.getAll(Module.class); selectedModule = new ArrayList<Module>(); allRole = service.getAll(Role.class); createNewRole = false; }
@AfterCompose public void afterCompose(@ContextParam(ContextType.VIEW) Component view) { Double ie = Servlets.getBrowser(request, "ie"); if (ie != null && ie < 8.0) { Clients.showNotification("This application does not support IE6/7", true); } Selectors.wireComponents(view, this, false); }
@AfterCompose public void afterCompose(@ContextParam(ContextType.VIEW) Component view) { Selectors.wireComponents(view, this, false); // Selectors.wireEventListeners(view, this); Clients.showNotification( "Clique aqui para adicionar um novo Tipo de Compartimento", "info", this.tbtnNovoTipoCompartimento, "end_center", 3000); }
@Listen("onTimer = #timer") public void printVisibleWindows() { List<Component> popupList = Selectors.find(getPage(), "popup"); List<Component> windowList = Selectors.find( getPage(), "window[mode='modal'][visible=true], window[mode='overlapped'][visible=true]"); System.out.println(popupList.size() + " popup"); System.out.println(windowList.size() + " window"); popupList = Selectors.find(getPage(), "popup"); int visibleCount = 0; for (Component c : popupList) { Popup p = (Popup) c; if (p.isVisible()) { visibleCount++; } } System.out.println(visibleCount + " visible popup"); }
@AfterCompose public void afterCompose(@ContextParam(ContextType.VIEW) Component view) { Selectors.wireComponents(view, this, false); }
public void setLoad(boolean load) { this.load = load; Executions.createComponents("/pages/composite/viewWindow.zul", this, null); Selectors.wireComponents(this, this, false); Selectors.wireEventListeners(this, this); }
/** * @param comp * @param controller */ private static void wireController(Component comp, Object controller) { Selectors.wireVariables(comp, controller, null); Selectors.wireComponents(comp, controller, true); Selectors.wireEventListeners(comp, controller); }