protected void onFormOpen() throws ims.framework.exceptions.PresentationLogicException { createDynamicGridColumns(); loadColors(); if(form.getGlobalContext().Core.getChartTypeRecordIsNotNull()) { //edit form.pnlTitle().setValue("Edit Chart Type"); ChartTypeVo chartType = domain.getChartType(form.getGlobalContext().Core.getChartTypeRecord()); populateScreenFromDataLocal(chartType); form.getLocalContext().setCurrentRecord(chartType); } else { //new form.pnlTitle().setValue("Add Chart Type"); form.chkActive().setValue(true); } form.setMode(FormMode.EDIT); updateContextMenu(); }
private ChartTypeVo populateDataFromScreenLocal() { ChartTypeVo record = populateDataFromScreen(form.getLocalContext().getCurrentRecord()); record.setNormalBandColour(form.cmbNormalColour().getValue()); if(record.getDatasetTypes() == null) record.setDatasetTypes(new ChartTypeDatasetVoCollection()); else record.getDatasetTypes().clear(); int order = 1; //WDEV-12548 for (int i = 0; i < form.dyngrdLinkedDataSets().getRows().size(); i++) { DynamicGridRow row = form.dyngrdLinkedDataSets().getRows().get(i); ChartTypeDatasetVo item = new ChartTypeDatasetVo(); item.setDatasetType((DataSetTypeVo)row.getValue()); if(row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_ANSWERBOX)).getValue().equals(LineTypeStatus.CUSTOM)) { item.setLineType((LineType) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_LINETYPE)).getValue()); item.setLineColourPointIcon((LineColourPointIcon) row.getCells().get(form.dyngrdLinkedDataSets().getColumns().getByIdentifier(COL_COLOR_ICON)).getValue()); } item.setSortOrder(Integer.valueOf(order++)); //WDEV-12548 record.getDatasetTypes().add(item); } return record; }
private DataSetTypeVo getDatasetType(ChartTypeVo chartType, DatasetTypeRefVo id) { for (int x = 0; x < chartType.getDatasetTypes().size(); x++) { if (id.equals(chartType.getDatasetTypes().get(x).getDatasetType())) return chartType.getDatasetTypes().get(x).getDatasetType(); } return null; }
private ChartTypeDatasetVo getChartTypeDataset(ChartTypeVo chartType, DataSetTypeVo dataset) { if (chartType == null || chartType.getDatasetTypes() == null || dataset == null) return null; for (int x = 0; x < chartType.getDatasetTypes().size(); x++) { ChartTypeDatasetVo chartTypeDataset = chartType.getDatasetTypes().get(x); if (chartTypeDataset != null && chartTypeDataset.getDatasetType() != null && chartTypeDataset.getDatasetType().equals(dataset)) return chartTypeDataset; } return null; }
public ChartTypeVo getChartType(ChartTypeRefVo refObj) { ChartTypeDetails impl = (ChartTypeDetails) getDomainImpl(ChartTypeDetailsImpl.class); return impl.getChartType(refObj); }
public ChartTypeVo getChartType(ChartTypeRefVo id) { return ChartTypeVoAssembler.create((ChartType)getDomainFactory().getDomainObject(ChartType.class, id.getID_ChartType())); }