@Override public void afterCompose() { Components.wireVariables(this, this); Components.addForwards(this, this); user = (WkTUser) Sessions.getCurrent().getAttribute("user"); // 获取当前登录用户 qklwListbox.setItemRenderer(new MeetingRenderer()); rank.setItemRenderer(new qkTypeRenderer()); List<Jxkh_BusinessIndicator> holdList = new ArrayList<Jxkh_BusinessIndicator>(); holdList.add(new Jxkh_BusinessIndicator()); if (jxkhMeetingService.findRank(qikan) != null) { holdList.addAll(jxkhMeetingService.findRank(qikan)); } rank.setModel(new ListModelList(holdList)); initWindow(); // String[] s = { "", "待审核", "部门通过", "部门不通过", "业务办通过", "业务办不通过", "归档" }; String[] s = {"", "待审核", "部门审核中", "部门通过", "部门不通过"}; List<String> lwjbList = new ArrayList<String>(); for (int i = 0; i < 5; i++) { lwjbList.add(s[i]); } auditState.setModel(new ListModelList(lwjbList)); auditState.setSelectedIndex(0); }
public void doAfterCompose(Component EditSalaryHeadWindow) throws Exception { super.doAfterCompose(EditSalaryHeadWindow); GenericDelegator delegator = HrmsInfrastructure.getDelegator(); // GenericDelegator.getGenericDelegator("default"); /* * EntityCondition condition = EntityCondition.makeCondition("enumTypeId", * EntityOperator.EQUALS, "CLAIM_TYPE"); */ EntityCondition currencyCondition = EntityCondition.makeCondition("uomTypeId", EntityOperator.EQUALS, "CURRENCY_MEASURE"); Set<String> SalaryHeadTypeToDisplay = new HashSet(); Set<String> currencyTypeToDisplay = new HashSet(); Set<String> SalaryComputationTypeToDisplay = new HashSet(); SalaryHeadTypeToDisplay.add("salaryHeadTypeId"); SalaryHeadTypeToDisplay.add("description"); currencyTypeToDisplay.add("uomId"); currencyTypeToDisplay.add("description"); SalaryComputationTypeToDisplay.add("salaryComputationTypeId"); SalaryComputationTypeToDisplay.add("description"); // =====================SalaryHeadType============================== List<GenericValue> salaryHeadType = delegator.findList("SalaryHeadType", null, SalaryHeadTypeToDisplay, null, null, false); salaryHeadType.add(0, null); SimpleListModel salaryHeadTypeList = new SimpleListModel(salaryHeadType); Listbox applySalaryHeadType = (Listbox) EditSalaryHeadWindow.getFellow("applySalaryHeadType"); applySalaryHeadType.setModel(salaryHeadTypeList); applySalaryHeadType.setItemRenderer(new SalaryHeadTypeRenderer()); // =====================UOM===CURRENCY============================== List<GenericValue> currency = delegator.findList("Uom", currencyCondition, currencyTypeToDisplay, null, null, false); currency.add(0, null); SimpleListModel currencyList = new SimpleListModel(currency); Listbox currencyListBox = (Listbox) EditSalaryHeadWindow.getFellow("applyCurrencyUomId"); currencyListBox.setModel(currencyList); currencyListBox.setItemRenderer(new CurrencyRenderer()); // =====================SalaryComputationType============================== List<GenericValue> SalaryComputationType = delegator.findList( "SalaryComputationType", null, SalaryComputationTypeToDisplay, null, null, false); SalaryComputationType.add(0, null); SimpleListModel SalaryComputationTypeList = new SimpleListModel(SalaryComputationType); Listbox SalaryComputationTypeListBox = (Listbox) EditSalaryHeadWindow.getFellow("applyComputationType"); SalaryComputationTypeListBox.setModel(SalaryComputationTypeList); SalaryComputationTypeListBox.setItemRenderer(new SalaryComputationTypeRenderer()); // ======================================================================== }
public void afterCompose() { Components.wireVariables(this, this); Components.addForwards(this, this); user = (WkTUser) Sessions.getCurrent().getAttribute("user"); userListbox.setItemRenderer(new UserDetailListRenderer()); addUser.addEventListener( Events.ON_CLICK, new EventListener() { public void onEvent(Event event) throws Exception { final UserNewWindow w = (UserNewWindow) Executions.createComponents("/admin/system/user/userNew.zul", null, null); w.doHighlighted(); w.setClosable(true); w.initWindow(getDept()); w.addEventListener( Events.ON_CHANGE, new EventListener() { public void onEvent(Event arg0) throws Exception { reloadDeptTree(); w.detach(); } }); } }); }
@Override public void initShow() { fileListbox.setItemRenderer( new ListitemRenderer() { public void render(Listitem arg0, Object arg1) throws Exception { final String[] s = (String[]) arg1; if (s != null) { Listcell c0 = new Listcell(Integer.valueOf(arg0.getIndex() + 1).toString()); Listcell c1 = new Listcell(s[1]); Listcell c2 = new Listcell(); Toolbarbutton tb = new Toolbarbutton(); tb.setImage("/css/default/images/button/del.gif"); tb.addEventListener( Events.ON_CLICK, new EventListener() { public void onEvent(Event arg0) throws Exception { fileList.remove(s); fileListbox.setModel(new ListModelList(fileList)); } }); arg0.setValue(s); arg0.appendChild(c0); arg0.appendChild(c1); arg0.appendChild(c2); } } }); }
public void initWindow() { List deptlist = departmentService.findDeptByKdidAndType(0L, "1"); deptList.setModel(new ListModelList(deptlist)); deptList.setItemRenderer( new ListitemRenderer() { public void render(Listitem arg0, Object arg1) throws Exception { WkTDept dept = (WkTDept) arg1; arg0.setLabel(dept.getKdName()); arg0.setValue(dept.getKdId()); } }); deptList.getItemAtIndex(0).setSelected(true); WkTDept department = (WkTDept) deptlist.get(0); KdId = department.getKdId(); List rolelist = roleService.findByKdidAndKrname(KdId, "ѧÉú"); if (rolelist.size() != 0) { WkTRole role = (WkTRole) rolelist.get(0); Role = role.getKrId(); } search.setDisabled(true); loadTree(); initPanel(); WkTDept dept = (WkTDept) userService.get(WkTDept.class, KdId); yuan.setLabel(dept.getGradeName(WkTDept.GRADE_YUAN)); xi.setLabel(dept.getGradeName(WkTDept.GRADE_XI)); leaderlist.setItemRenderer( new ListitemRenderer() { public void render(Listitem item, Object data) throws Exception { final Student stu = (Student) data; Listcell c1 = new Listcell(item.getIndex() + 1 + ""); Listcell c2 = new Listcell(stu.getStId()); Listcell c3 = new Listcell(stu.getUser().getKuName()); Listcell c4 = new Listcell(stu.getStClass()); Listcell c5 = new Listcell(stu.getUser().getXiDept()); Listcell c6 = new Listcell(stu.getUser().getYuDept()); Listcell c7 = new Listcell(stu.getUser().getKuPasswd()); item.appendChild(c1); item.appendChild(c2); item.appendChild(c3); item.appendChild(c4); item.appendChild(c5); item.appendChild(c6); item.appendChild(c7); } }); }
@Listen("onClick=#btn_atualiza, #btn_aberto, #btn_fechado") public void criaLista(Event event) { String itemId = event.getTarget().getId(); ArrayList<Edital> editais = new ArrayList<>(); if (itemId.equals("btn_atualiza")) { editais.addAll(new EditalDAO().getAll()); } else if (itemId.equals("btn_aberto")) { editais.addAll(new EditalDAO().getOpened()); } else { editais.addAll(new EditalDAO().getClosed()); } // remove filhos da listbox listar_edital.getItems().clear(); ListModelList<Edital> editalModel = new ListModelList<Edital>(editais); // cria model listar_edital.setModel(editalModel); // recria listbox try { Listhead lh = new Listhead(); lh.appendChild(new Listheader("código edital")); lh.appendChild(new Listheader("projeto")); lh.appendChild(new Listheader("número de vagas")); lh.appendChild(new Listheader("data inicio")); lh.appendChild(new Listheader("data final")); listar_edital.appendChild(lh); } catch (Exception e) { // TODO: handle exception } listar_edital.setItemRenderer( new ListitemRenderer() { @Override public void render(Listitem listitem, Object data, int arg2) throws Exception { final Edital edital = (Edital) data; final Projeto projeto = new ProjetoDAO().getOneByCod(edital.getProjeto_cod()); new Listcell(String.valueOf(edital.getCod())).setParent(listitem); new Listcell(projeto.getCod() + "-" + projeto.getDescricao()).setParent(listitem); new Listcell(String.valueOf(edital.getN_vagas())).setParent(listitem); new Listcell(edital.getData_inicio().toString()).setParent(listitem); new Listcell(edital.getData_fim().toString()).setParent(listitem); } }); }
/** * *********************************************************** Search * *********************************************************** */ @Listen("onClick = #searchBtn") public void search() { String searchTerm = searchBox.getValue(); List<Node> nodes = nodeDao.matchByLabel("%" + searchTerm + "%"); ListModelList<Node> nodeModel = new ListModelList<Node>(nodes); nodeList.setModel(nodeModel); nodeList.setItemRenderer(new NodeRenderer()); footer.setLabel(nodes.size() + " nodes found."); }
/** * faz a construção dos itens(listitem) da janela, baseando no entity do composer * * @param composer */ private void buildListItemFromEntity(ComposerController<?> composer) { if (this.divListitem.getChildren().size() == 1) { Listcell cell = (Listcell) this.divListitem.getChildren().get(0); this.divListitem.removeChild(cell); // (Listbox) this.divListitem.getParent(); Listbox listBox = this.divListBox; listBox.setItemRenderer(new CrudWindowListItemRenderer(composer, this.divListBox, cell)); } }
public void afterCompose() { Components.wireVariables(this, this); Components.addForwards(this, this); deptlist.setItemRenderer( new ListitemRenderer() { public void render(Listitem arg0, Object arg1) throws Exception { WkTDept dept = (WkTDept) arg1; arg0.setLabel(dept.getKdName()); arg0.setValue(dept); } }); listbox1.setItemRenderer( new ListitemRenderer() { public void render(Listitem arg0, Object arg1) throws Exception { WkTUser user = (WkTUser) arg1; Listcell c0 = new Listcell(); Listcell c1 = new Listcell(user.getKuLid()); Listcell c2 = new Listcell(user.getKuName()); Listcell c3 = new Listcell(deptlist.getSelectedItem().getLabel()); arg0.appendChild(c0); arg0.appendChild(c1); arg0.appendChild(c2); arg0.appendChild(c3); arg0.setValue(arg1); } }); listbox2.setItemRenderer( new ListitemRenderer() { public void render(Listitem arg0, Object arg1) throws Exception { WkTUser user = (WkTUser) arg1; Listcell c0 = new Listcell(); Listcell c1 = new Listcell(user.getKuLid()); Listcell c2 = new Listcell(user.getKuName()); Listcell c3 = new Listcell(user.getDept().getKdName()); arg0.appendChild(c0); arg0.appendChild(c1); arg0.appendChild(c2); arg0.appendChild(c3); arg0.setValue(arg1); } }); }
@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(); }
@Override public void initShow() { // initWindow(); teacherlist.setItemRenderer( new ListitemRenderer() { public void render(Listitem arg0, Object arg1) throws Exception { final Zbteacher teacher = (Zbteacher) arg1; arg0.setValue(teacher); Listcell c0 = new Listcell(arg0.getIndex() + 1 + ""); Listcell c1 = new Listcell(teacher.getUser().getKuLid()); Listcell c2 = new Listcell(teacher.getUser().getKuName()); Listcell c3 = new Listcell(teacher.getTeacher().getTitle().getTiName()); Listcell c4 = new Listcell(teacher.getTeacher().getXiDept(getSchoolDept().getKdId())); Listcell c5 = new Listcell(teacher.getTeacher().getYuDept(getSchoolDept().getKdId())); Listcell c6 = new Listcell(); InnerButton bt1 = new InnerButton("删除"); bt1.addEventListener( Events.ON_CLICK, new EventListener() { public void onEvent(Event arg0) throws Exception { if (Messagebox.show( "您确定要删除该教师吗?", "提示", Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION) == Messagebox.OK) { zbteacherService.delete(teacher); Messagebox.show("删除成功!", "提示", Messagebox.OK, Messagebox.INFORMATION); onClick$query(); } } }); c6.appendChild(bt1); arg0.appendChild(c0); arg0.appendChild(c1); arg0.appendChild(c2); arg0.appendChild(c3); arg0.appendChild(c4); arg0.appendChild(c5); arg0.appendChild(c6); } }); }
/** * 报告列表点击事件,显示自动生成的TOPN报告 * * @param event */ public void onSelecttopNList(Event event) { Listitem item = topNList.getSelectedItem(); if (topNGenerateTime.getItemCount() > 0) { topNGenerateTime.getItems().clear(); } if (item == null) { return; } String reportid = item.getId(); IniFile iniGen = new IniFile("reportTopN." + reportid + ".ini"); try { iniGen.load(); } catch (Exception e) { return; } topn_time.setVisible(true); TopNLogListmodel model = new TopNLogListmodel(iniGen, this); topNGenerateTime.setModel(model); topNGenerateTime.setItemRenderer(model); }
public void onCreate$window_Permohonan(Event event) throws Exception { if (logger.isDebugEnabled()) { logger.debug("--> " + event.toString()); } doCheckRights(); Map<String, Object> args = getCreationArgsMap(event); if (args.containsKey("tPermohonan")) { TPermohonan tPermohonan = (TPermohonan) args.get("tPermohonan"); settPermohonan(tPermohonan); } else { settPermohonan(null); } if (args.containsKey("permohonanBaruCtrl")) { permohonanBaruCtrl = (PermohonanBaruCtrl) args.get("permohonanBaruCtrl"); } else { permohonanBaruCtrl = null; } if (args.containsKey("listbox_DaftarPermohonan")) { listbox_DaftarPermohonan = (Listbox) args.get("listbox_DaftarPermohonan"); } else { listbox_DaftarPermohonan = null; } if (getPelaksanaanGangguanService().getEmployeeName() != null) { ListModelList lmlNamaPelaksana = new ListModelList(getPelaksanaanGangguanService().getEmployeeName()); VHrEmployeePelaksana pelaksana = new VHrEmployeePelaksana(); pelaksana.setEmployee_name("Silakan pilih"); pelaksana.setEmployee_no("555"); lmlNamaPelaksana.add(0, pelaksana); listbox_NamaPelaksana.setModel(lmlNamaPelaksana); listbox_NamaPelaksana.setItemRenderer(new PelaksanaListModelItemRenderer()); } doShowDialog(gettPermohonan(), gettVerifikasi()); }
public void afterCompose() { Components.wireVariables(this, this); Components.addForwards(this, this); modelListbox = new ListModelList(nameList); // 附件列表 upList.setItemRenderer( new ListitemRenderer() { public void render(Listitem arg0, Object arg1) throws Exception { if (arg1 instanceof Media) { Media media = (Media) arg1; arg0.setValue(arg1); arg0.setLabel(media.getName()); } else { WkTFile f = (WkTFile) arg1; arg0.setValue(arg1); arg0.setLabel(f.getId().getKfShowname()); } } }); newsService = (NewsService) SpringUtil.getBean("newsService"); dis = (WkTDistribute) Executions.getCurrent().getAttribute("kiTitle"); initInfo(dis); }
public void loadSignList() { listModelList = new ListModelList(sList); signList.setModel(listModelList); signList.setItemRenderer( new ListitemRenderer() { public void render(final Listitem item, Object arg1) throws Exception { final WKTHtmlSign htmlSign = (WKTHtmlSign) arg1; item.setValue(htmlSign); Listcell c1 = new Listcell(htmlSign.getKsName()); Listcell c2 = new Listcell(htmlSign.getKsValue()); item.appendChild(c1); item.appendChild(c2); item.addEventListener( Events.ON_CLICK, new EventListener() { public void onEvent(Event arg0) throws Exception { signName.setValue(htmlSign.getKsName()); signValue.setValue(htmlSign.getKsValue()); if ((item.getIndex() + 1) == 1) { moveUp.setDisabled(true); moveDown.setDisabled(false); } else if ((item.getIndex() + 1) == sList.size()) { moveDown.setDisabled(true); moveUp.setDisabled(false); } else { moveDown.setDisabled(false); moveUp.setDisabled(false); } } }); } }); }
/** * Before binding the data and calling the dialog window we check, if the zul-file is called with * a parameter for a selected user object in a Map. * * @param event * @throws Exception */ public void onCreate$orderPositionDialogWindow(Event event) throws Exception { /* set components visible dependent of the users rights */ doCheckRights(); // create the Button Controller. Disable not used buttons during working btnCtrl = new ButtonStatusCtrl( getUserWorkspace(), btnCtroller_RightPrefix, true, btnNew, btnEdit, btnDelete, btnSave, btnCancel, btnClose); // get the params map that are overhanded by creation. Map<String, Object> args = getCreationArgsMap(event); if (args.containsKey("order")) { order = (Order) args.get("order"); } else { setOrder(null); } if (args.containsKey("orderposition")) { orderposition = (Orderposition) args.get("orderposition"); setOrderposition(orderposition); // we must addionally check if there is NO order object in the // orderPosition, so its new. if (orderposition.getOrder() != null) { setOrder(this.order); setArticle(this.orderposition.getArticle()); setCustomer(this.order.getCustomer()); } } else { setOrderposition(null); } // we get the listBox Object for the offices list. So we have access // to it and can synchronize the shown data when we do insert, edit or // delete orderPositions here. if (args.containsKey("listBoxOrderOrderPositions")) { listBoxOrderOrderPositions = (Listbox) args.get("listBoxOrderOrderPositions"); } else { listBoxOrderOrderPositions = null; } if (args.containsKey("orderDialogCtrl")) { orderDialogCtrl = (OrderDialogCtrl) args.get("orderDialogCtrl"); } else { orderDialogCtrl = null; } if (args.containsKey("orderListCtrl")) { orderListCtrl = (OrderListCtrl) args.get("orderListCtrl"); } else { orderListCtrl = null; } setPageSizeArticleSearch(20); paging_ListBoxArticleSearch.setPageSize(getPageSizeArticleSearch()); paging_ListBoxArticleSearch.setDetailed(true); /* Sorting Comparator for search bandbox article list */ listheader_ArticleSearch_artNr.setSortAscending(new FieldComparator("artNr", true)); listheader_ArticleSearch_artNr.setSortDescending(new FieldComparator("artNr", true)); listheader_ArticleSearch_artKurzbezeichnung.setSortAscending( new FieldComparator("article.artKurzbezeichnung", true)); listheader_ArticleSearch_artKurzbezeichnung.setSortDescending( new FieldComparator("article.artKurzbezeichnung", true)); listBoxArticleSearch.setItemRenderer(new SearchArticleListModelItemRenderer()); doShowDialog(getOrderposition()); }
@SuppressWarnings("deprecation") public static void showSalaryHeadWindow(Event event, GenericValue gv) throws SuspendNotAllowedException, InterruptedException, GenericEntityException { Component approveClaimWindow = event.getTarget(); GenericValue userLogin = (GenericValue) Executions.getCurrent().getDesktop().getSession().getAttribute("userLogin"); GenericValue person = (GenericValue) Executions.getCurrent().getDesktop().getSession().getAttribute("person"); String salaryHeadId = gv.getString("salaryHeadId"); String hrName = gv.getString("hrName"); String isCr = gv.getString("isCr"); String salaryHeadTypeId = gv.getString("salaryHeadTypeId"); String geoId = gv.getString("geoId"); String isTaxable = gv.getString("isTaxable"); String isMandatory = gv.getString("isMandatory"); String currencyUomId = gv.getString("currencyUomId"); String salaryComputationTypeId = gv.getString("salaryComputationTypeId"); Window win = (Window) Executions.createComponents( "/zul/payRollManagement/updateSalaryHead.zul", null, UtilMisc.toMap("oldHrName", hrName)); win.setTitle("Update Salary Head"); GenericDelegator delegator = HrmsInfrastructure.getDelegator(); // GenericDelegator.getGenericDelegator("default"); /* * EntityCondition condition = EntityCondition.makeCondition("enumTypeId", * EntityOperator.EQUALS, "CLAIM_TYPE"); */ EntityCondition currencyCondition = EntityCondition.makeCondition("uomTypeId", EntityOperator.EQUALS, "CURRENCY_MEASURE"); Set<String> SalaryHeadTypeToDisplay = new HashSet(); Set<String> currencyTypeToDisplay = new HashSet(); Set<String> SalaryComputationTypeToDisplay = new HashSet(); SalaryHeadTypeToDisplay.add("salaryHeadTypeId"); SalaryHeadTypeToDisplay.add("description"); currencyTypeToDisplay.add("uomId"); currencyTypeToDisplay.add("description"); SalaryComputationTypeToDisplay.add("salaryComputationTypeId"); SalaryComputationTypeToDisplay.add("description"); // =====================SalaryHeadType============================== List<GenericValue> salaryHeadType = delegator.findList("SalaryHeadType", null, SalaryHeadTypeToDisplay, null, null, false); salaryHeadType.add(0, null); SimpleListModel salaryHeadTypeList = new SimpleListModel(salaryHeadType); Listbox applySalaryHeadTypeListBox = (Listbox) win.getFellow("applySalaryHeadType"); applySalaryHeadTypeListBox.setModel(salaryHeadTypeList); applySalaryHeadTypeListBox.setItemRenderer(new SalaryHeadTypeRenderer()); for (int i = 1; i < salaryHeadType.size(); i++) { GenericValue IndividualsalaryHeadType = salaryHeadType.get(i); String itemValue = IndividualsalaryHeadType.getString("salaryHeadTypeId"); if (itemValue.equals(salaryHeadTypeId)) { applySalaryHeadTypeListBox.setSelectedIndex(i); break; } } // =====================UOM===CURRENCY============================== List<GenericValue> currency = delegator.findList("Uom", currencyCondition, currencyTypeToDisplay, null, null, false); currency.add(0, null); SimpleListModel currencyList = new SimpleListModel(currency); Listbox currencyListBox = (Listbox) win.getFellow("applyCurrencyUomId"); currencyListBox.setModel(currencyList); currencyListBox.setItemRenderer(new CurrencyRenderer()); for (int i = 1; i < currency.size(); i++) { GenericValue IndividualCurrency = currency.get(i); String itemValue = IndividualCurrency.getString("uomId"); if (itemValue.equals(currencyUomId)) { currencyListBox.setSelectedIndex(i); break; } } // =====================SalaryComputationType============================== List<GenericValue> SalaryComputationType = delegator.findList( "SalaryComputationType", null, SalaryComputationTypeToDisplay, null, null, false); SalaryComputationType.add(0, null); SimpleListModel SalaryComputationTypeList = new SimpleListModel(SalaryComputationType); Listbox SalaryComputationTypeListBox = (Listbox) win.getFellow("applyComputationType"); SalaryComputationTypeListBox.setModel(SalaryComputationTypeList); SalaryComputationTypeListBox.setItemRenderer(new SalaryComputationTypeRenderer()); for (int i = 1; i < SalaryComputationType.size(); i++) { GenericValue IndividualSalaryComputationType = SalaryComputationType.get(i); String itemValue = IndividualSalaryComputationType.getString("salaryComputationTypeId"); if (itemValue.equals(salaryComputationTypeId)) { SalaryComputationTypeListBox.setSelectedIndex(i); break; } } // ======================================================================== // salaryHeadName Label salaryHeadNameLabel = (Label) win.getFellow("salaryHeadName"); salaryHeadNameLabel.setValue(salaryHeadId); Textbox salaryHeadIdTextbox = (Textbox) win.getFellow("salaryHeadId"); salaryHeadIdTextbox.setValue(salaryHeadId); Textbox hrNameTextbox = (Textbox) win.getFellow("applyHrName"); hrNameTextbox.setValue(hrName); String Credit = ""; if (isCr.equals("Y")) Credit = "YES"; else Credit = "NO"; Listbox CreditListbox = (Listbox) win.getFellow("applyCredit"); Listitem CreditListItem = new Listitem(); for (int i = 1; i <= 2; i++) { CreditListItem = CreditListbox.getItemAtIndex(i); String itemValue = (String) CreditListItem.getValue(); if (itemValue.equals(isCr)) { CreditListbox.setSelectedIndex(i); break; } } /* * Bandbox geoIdBandbox = (Bandbox) win.getFellow("searchPanel"); * geoIdBandbox.setValue(geoId); */ CountryBox geoIdBandbox = (CountryBox) win.getFellow("countrybandbox"); geoIdBandbox.setValue(geoId); String Taxable = ""; if (isTaxable.equals("Y")) Taxable = "YES"; else Taxable = "NO"; Listbox isTaxableListbox = (Listbox) win.getFellow("applyTaxable"); Listitem isTaxableListItem = new Listitem(); for (int i = 1; i <= 2; i++) { isTaxableListItem = isTaxableListbox.getItemAtIndex(i); String itemValue = (String) isTaxableListItem.getValue(); if (itemValue.equals(isTaxable)) { isTaxableListbox.setSelectedIndex(i); break; } } String Mandatory = ""; if (isMandatory.equals("Y")) Mandatory = "YES"; else Mandatory = "NO"; Listbox isMandatoryListbox = (Listbox) win.getFellow("applyMandatory"); Listitem isMandatoryListItem = new Listitem(); for (int i = 1; i <= 2; i++) { isMandatoryListItem = isMandatoryListbox.getItemAtIndex(i); String itemValue = (String) isMandatoryListItem.getValue(); if (itemValue.equals(isMandatory)) { isMandatoryListbox.setSelectedIndex(i); break; } } // approveClaimWindow.detach(); win.doModal(); }
/** Creates the components..<br> */ private void createComponents() { /** * !! Windows as NameSpaceContainer to prevent not unique id's error from other dashboard module * buttons or other used components. */ Window win = new Window(); win.setBorder("none"); win.setParent(this); Groupbox gb = new Groupbox(); gb.setMold("3d"); gb.setClosable(false); gb.setParent(win); Caption cap = new Caption(); cap.setImage("/images/icons/new_icons_10.gif"); cap.setLabel(Labels.getLabel("common.Application.History")); cap.setStyle("padding: 0px;"); cap.setParent(gb); // Buttons Toolbar/Timer Div div = new Div(); div.setSclass("z-toolbar"); div.setStyle("padding: 0px"); div.setParent(cap); Hbox hbox = new Hbox(); hbox.setPack("stretch"); hbox.setSclass("hboxRemoveWhiteStrips"); hbox.setWidth("100%"); hbox.setParent(div); Toolbar toolbarRight = new Toolbar(); toolbarRight.setAlign("end"); toolbarRight.setStyle("float:right; border-style: none;"); toolbarRight.setParent(hbox); Hbox hboxBtn = new Hbox(); hboxBtn.setSclass("hboxRemoveWhiteStrips"); hboxBtn.setWidth("100%"); hboxBtn.setParent(toolbarRight); // Paging paging = new Paging(); // paging.setParent(hboxBtn); // paging.setDetailed(true); if (isTimerControl()) { Button btnTimer = new Button(); btnTimer.setId("btnTimer"); btnTimer.setHeight("22px"); btnTimer.setImage("/images/icons/clock1_16x16.gif"); // convert to seconds int seconds = (int) Math.round(getDelay() / 1000); if (seconds > 60) { // convert to minutes and set localization to minutes int minutes = (int) Math.round((getDelay() / 1000) / 60); btnTimer.setTooltiptext( Labels.getLabel("btnTimer.tooltiptext") + " " + minutes + " " + Labels.getLabel("common.Minutes")); } else // set localization to seconds btnTimer.setTooltiptext( Labels.getLabel("btnTimer.tooltiptext") + " " + seconds + " " + Labels.getLabel("common.Seconds")); btnTimer.addEventListener("onClick", new BtnClickListener()); btnTimer.setParent(hboxBtn); } Button btnRefresh = new Button(); btnRefresh.setId("btnRefresh"); btnRefresh.setHeight("22px"); btnRefresh.setLabel("!"); btnRefresh.setTooltiptext(Labels.getLabel("btnRefresh.tooltiptext")); btnRefresh.addEventListener("onClick", new BtnClickListener()); btnRefresh.setParent(hboxBtn); // END Buttons Toolbar/Timer // body Borderlayout bl = new Borderlayout(); bl.setHeight(getModulHeight() + "px"); bl.setParent(gb); Center ct = new Center(); ct.setSclass("FDCenterNoBorder"); ct.setStyle("background-color: white"); ct.setFlex(true); ct.setParent(bl); // Listbox listbox = new Listbox(); listbox.setStyle("border: none;"); listbox.setHeight("100%"); listbox.setVisible(true); listbox.setParent(ct); listbox.setItemRenderer(new ItemRenderer()); Listhead listhead = new Listhead(); listhead.setParent(listbox); Listheader listheader1 = new Listheader(); listheader1.setWidth("100px"); listheader1.setHeight("0px"); listheader1.setParent(listhead); Listheader listheader2 = new Listheader(); listheader2.setWidth("100%"); listheader1.setHeight("0px"); listheader2.setParent(listhead); doReadData(); }