protected void onContextMenuItemClick(int menuItemID, Control sender) throws PresentationLogicException { switch (menuItemID) { case GenForm.ContextMenus.ChartType.ADD : form.getGlobalContext().Core.setChartTypeRecord(null); form.getGlobalContext().Core.setDataSetRecord(form.qmbDataset().getValue()); form.getGlobalContext().Core.setLastNameSelected(form.txtName().getValue()); engine.open(form.getForms().Core.ChartTypeDetails); return; case GenForm.ContextMenus.ChartType.EDIT : form.getGlobalContext().Core.setChartTypeRecord((ChartTypeShortVo) form.dyngrdChart().getValue()); form.getGlobalContext().Core.setDataSetRecord(form.qmbDataset().getValue()); form.getGlobalContext().Core.setLastNameSelected(form.txtName().getValue()); engine.open(form.getForms().Core.ChartTypeDetails); return; default : break; } updateContextMenu(); }
private void updateContextMenu() { form.getContextMenus().hideAllChartTypeMenuItems(); form.getContextMenus().getChartTypeADDItem().setVisible(true); form.getContextMenus().getChartTypeEDITItem().setVisible(form.dyngrdChart().getValue() instanceof ChartTypeShortVo); }
private void addChartType(ChartTypeShortVo value) { form.lyrMain().tabCharting().cmbChartType().newRow(value, value.getName()); }