@SuppressWarnings("unchecked") @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); webEmployee = (WebEmployee) ZkUtils.getSessionAttribute("webEmployee"); Map<String, String> map = new HashMap<String, String>(); map = ZkUtils.getExecutionArgs(); String dbId = map.get("dbId"); currentPage = map.get("currentPage"); aDbId = dbId; codeDb = ((ErmCodeDbService) SpringUtil.getBean("ermCodeDbService")) .findcodeDbByDbId(dbId, webEmployee); if (dbId != null) { dbIdTxt.setValue(codeDb.getDbId()); dbNameTxt.setValue(codeDb.getName()); resourcesIdTxt.setValue(codeDb.getResourcesId()); // solr查詢語句 String solrQuery = ""; solrQuery += "type_id:DB"; // resourceId if (codeDb.getResourcesId() != null && !codeDb.getResourcesId().trim().equals("")) { solrQuery += " resources_id:" + codeDb.getResourcesId(); } List<ErmResourcesMainfileV> resMainDbwsList = ((ResourcesMainDbwsSolrSearch) SpringUtil.getBean("resourcesMainDbwsSolrSearch")) .resourcesMainSearch(solrQuery); if (resMainDbwsList.size() > 0) { resourcesNameTxt.setValue(resMainDbwsList.get(0).getTitle()); } orderNoIbx.setValue(codeDb.getOrderNo()); urlTxt.setValue(codeDb.getUrl()); if (codeDb.getEzproxy() != null) { if (codeDb.getEzproxy().equals("Y")) { ezproxyRdo.setSelectedIndex(0); } else { ezproxyRdo.setSelectedIndex(1); } } ((ErmResourcesSuunitIdService) SpringUtil.getBean("ermResourcesSuunitIdService")) .findBySuunitResId(dbId); } if (dbIdTxt.getValue() == null || dbIdTxt.getValue().equals("")) { addSuunitBtn.setDisabled(true); delSuunitBtn.setDisabled(true); } flushList(); // List<ErmResourcesSuunit> sunitList=new // ArrayList<ErmResourcesSuunit>(); // sunitList=((ErmResourcesSuunitIdService) SpringUtil // .getBean("ermResourcesSuunitIdService")).findBySuunitResId(dbId); // if (sunitList.size() > 0) { // ListModelList<ErmResourcesSuunit> listModel = new // ListModelList<ErmResourcesSuunit>(sunitList); // listModel.setMultiple(true); // resMainSuunitLix.setModel(listModel); // } }
@Override public void doAfterCompose(Div comp) throws Exception { super.doAfterCompose(comp); List<Product> prods = DAOs.getProductDAO().findAll(); ListModelList<Product> prodModel = new ListModelList<Product>(prods); prodGrid.setModel(prodModel); }
@Override public void doAfterCompose(Window comp) throws Exception { super.doAfterCompose(comp); if (logger.isDebugEnabled()) logger.debug("Init.."); setConfigDefaults(); setAllChartLayers(); setSelectedChartLayers(); allCharts.setModel(allChartsModel); selectedChartsModel = new ListModelList<String>(selectedListArray); selectedCharts.setModel(selectedChartsModel); }
@Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); Importer importer = Importers.getImporter(); Book book1 = importer.imports(getFile("/WEB-INF/books/resume.xlsx"), "resume.xlsx"); Book book2 = importer.imports(getFile("/WEB-INF/books/profile.xlsx"), "profile.xlsx"); // can load more books... resume.setBook(book1); profile.setBook(book2); BookSeriesBuilder.getInstance().buildBookSeries(new Book[] {book1, book2}); }
@SuppressWarnings({"rawtypes", "unchecked"}) @Override public void doAfterCompose(Window comp) throws Exception { super.doAfterCompose(comp); UserCredentialManager mgmt = UserCredentialManager.getIntance(); NoteUser user = mgmt.getUser(); StringBuilder sb = new StringBuilder(); if (user != null) { if (user.getFirstName() != null) { sb.append(user.getFirstName() + " "); } if (user.getLastName() != null) { sb.append(user.getLastName() + " "); } sb.append("(" + user.getRole().name() + ")"); loginUsrName.setValue(sb.toString()); } else { loginUsrName.setValue("Guest"); } /* * http://www.zkoss.org/zkdemo/input/wysiwyg_editor * http://books.zkoss.org/wiki/ZK_Developer's_Reference/Event_Handling/Event_Queues */ // editor.setCustomConfigurationsPath("/js/ckeditorcfg.js"); // editor.setToolbar("Full"); EventQueues.lookup("myqueue1", EventQueues.SESSION, true) .subscribe( new EventListener() { public void onEvent(Event evt) { if (!"onTopicInit".equals(evt.getName())) { return; } TopicItem item = (TopicItem) evt.getData(); log.info("I've got this!! " + item.getId()); currentNodeId = item.getId(); NoteNode node = noteService.findTopic(currentNodeId); notePath.setValue(node.getPath()); editor.setValue(node.getText()); } }); List<NoteNode> list = noteService.findAllTopicsByUser(user.getId()); filterbox.setModel(new SimpleListModel(list.toArray())); }
@Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); inicializar(); }
@Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); pesquisaContadors(); }
@Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); criaLista(new Event("onClick", btn_atualiza)); }
@Override public void doAfterCompose(Window comp) throws Exception { super.doAfterCompose(comp); label.setValue(Integer.toString(orderService.findAll().size())); }