private void editInstance() { TriageKPIUnboundDBVo tempVO = new TriageKPIUnboundDBVo(); DynamicGridRow row = form.dyngrdKPI().getSelectedRow(); DynamicGridCell cell = row.getCells().get(getColumnKPI(COLUMN_BREACHWARNING)); tempVO.setBreachWarning(cell.getValue() != null ? Integer.parseInt((String) cell.getValue()):null); cell = row.getCells().get(getColumnKPI(COLUMN_BREACHTEXTCOLOUR)); tempVO.setBreachWarningTextColour((Color) cell.getValue()); //wdev-16138 //wdev-16138 cell = row.getCells().get(getColumnKPI(COLUMN_BREACHFLASHINGTEXTCOLOUR)); tempVO.setBreachWarningFlashingTextColour((Color) cell.getValue()); cell = row.getCells().get(getColumnKPI(COLUMN_BREACHBACGROUNDCOLOUR)); tempVO.setBreachWarningBackgroundColour((Color) cell.getValue()); //------------ cell = row.getCells().get(getColumnKPI(COLUMN_BREACHED)); tempVO.setBreachedKPI(cell.getValue() != null ? Integer.parseInt((String) cell.getValue()):null); cell = row.getCells().get(getColumnKPI(COLUMN_BREACHEDTEXTCOLOUR)); //wdev-16138 tempVO.setBreachedKPITextColour((Color) cell.getValue()); //wdev-16138 cell = row.getCells().get(getColumnKPI(COLUMN_BREACHEDFLASHINGTEXTCOLOUR)); tempVO.setBreachedKPIFlashingTextColour((Color) cell.getValue()); cell = row.getCells().get(getColumnKPI(COLUMN_BREACHEDBACKGROUNDCOLOUR)); tempVO.setBreachedKPIBackgroundColour((Color) cell.getValue()); //WDEV-16991 cell = row.getCells().get(getColumnKPI(COLUMN_DEFAULT_ROW_COLOUR)); tempVO.setDefaultRowColour((Color) cell.getValue()); cell = row.getCells().get(getColumnKPI(COLUMN_DEFAULT_FONT_COLOUR)); tempVO.setDefaultFontColour((Color) cell.getValue()); FlashingKPITextCoulourVo tempKpiVo = (FlashingKPITextCoulourVo) row.getIdentifier(); if( tempKpiVo != null && tempKpiVo instanceof FlashingKPITextCoulourVo) { if( tempKpiVo != null) { tempVO.setBreachWarningFlashingText(tempKpiVo.getBreachWarningFlashingTest()); tempVO.setBreachedKPIFlashingText(tempKpiVo.getBreachedKPIFlashingText()); } } else { tempVO.setBreachWarningFlashingText(null); tempVO.setBreachedKPIFlashingText(null); } //-------------- tempVO.setTypeRow((String) form.dyngrdKPI().getSelectedRow().getValue()); form.getGlobalContext().Emergency.setTriageKPI(tempVO); engine.open(form.getForms().Emergency.KPIDataEntryDialog, new Object[]{new String((String) form.dyngrdKPI().getSelectedRow().getValue())}); }
private void pupulateRowDynGrid(TriageKPIUnboundDBVo tempVo,DynamicGridRow row) { DynamicGridCell Breach = row.getCells().get(getColumnKPI(COLUMN_BREACHWARNING)); Breach.setValue(tempVo.getBreachWarningIsNotNull() ? tempVo.getBreachWarning().toString():null); //wdev-16138 DynamicGridCell BreachTextColour = row.getCells().get(getColumnKPI(COLUMN_BREACHTEXTCOLOUR)); if( tempVo.getBreachWarningTextColour() != null) BreachTextColour.getItems().newItem(tempVo.getBreachWarningTextColour(), tempVo.getBreachWarningTextColour().getName(), tempVo.getBreachWarningTextColour().getImage()); BreachTextColour.setValue(tempVo.getBreachWarningTextColour()); DynamicGridCell BreachFlashingTextColour = row.getCells().get(getColumnKPI(COLUMN_BREACHFLASHINGTEXTCOLOUR)); if( tempVo.getBreachWarningFlashingTextColour() != null) BreachFlashingTextColour.getItems().newItem(tempVo.getBreachWarningFlashingTextColour(), tempVo.getBreachWarningFlashingTextColour().getName(), tempVo.getBreachWarningFlashingTextColour().getImage()); BreachFlashingTextColour.setValue(tempVo.getBreachWarningFlashingTextColour()); DynamicGridCell BreachBacgroundColour = row.getCells().get(getColumnKPI(COLUMN_BREACHBACGROUNDCOLOUR)); if( tempVo.getBreachWarningBackgroundColour() != null) BreachBacgroundColour.getItems().newItem(tempVo.getBreachWarningBackgroundColour(), tempVo.getBreachWarningBackgroundColour().getName(), tempVo.getBreachWarningBackgroundColour().getImage()); BreachBacgroundColour.setValue(tempVo.getBreachWarningBackgroundColour()); //------------------ DynamicGridCell Breached = row.getCells().get(getColumnKPI(COLUMN_BREACHED)); Breached.setValue(tempVo.getBreachedKPIIsNotNull()? tempVo.getBreachedKPI().toString():null); //wdev-16138 DynamicGridCell BreachedTextColour = row.getCells().get(getColumnKPI(COLUMN_BREACHEDTEXTCOLOUR)); if( tempVo.getBreachedKPITextColour() != null) BreachedTextColour.getItems().newItem(tempVo.getBreachedKPITextColour(), tempVo.getBreachedKPITextColour().getName(), tempVo.getBreachedKPITextColour().getImage()); BreachedTextColour.setValue(tempVo.getBreachedKPITextColour()); DynamicGridCell BreachedFlashingTextColour = row.getCells().get(getColumnKPI(COLUMN_BREACHEDFLASHINGTEXTCOLOUR)); if( tempVo.getBreachedKPIFlashingTextColour() != null) BreachedFlashingTextColour.getItems().newItem(tempVo.getBreachedKPIFlashingTextColour(), tempVo.getBreachedKPIFlashingTextColour().getName(), tempVo.getBreachedKPIFlashingTextColour().getImage()); BreachedFlashingTextColour.setValue(tempVo.getBreachedKPIFlashingTextColour()); DynamicGridCell BreachedBacgroundColour = row.getCells().get(getColumnKPI(COLUMN_BREACHEDBACKGROUNDCOLOUR)); if( tempVo.getBreachedKPIBackgroundColour() != null) BreachedBacgroundColour.getItems().newItem(tempVo.getBreachedKPIBackgroundColour(), tempVo.getBreachedKPIBackgroundColour().getName(), tempVo.getBreachedKPIBackgroundColour().getImage()); BreachedBacgroundColour.setValue(tempVo.getBreachedKPIBackgroundColour()); //WDEV-16991 DynamicGridCell DefaultRowColour = row.getCells().get(getColumnKPI(COLUMN_DEFAULT_ROW_COLOUR)); if( tempVo.getDefaultRowColour() != null) DefaultRowColour.getItems().newItem(tempVo.getDefaultRowColour(), tempVo.getDefaultRowColour().getName(), tempVo.getDefaultRowColour().getImage()); DefaultRowColour.setValue(tempVo.getDefaultRowColour()); DynamicGridCell DefaultFontColour = row.getCells().get(getColumnKPI(COLUMN_DEFAULT_FONT_COLOUR)); if( tempVo.getDefaultFontColour() != null) DefaultFontColour.getItems().newItem(tempVo.getDefaultFontColour(), tempVo.getDefaultFontColour().getName(), tempVo.getDefaultFontColour().getImage()); DefaultFontColour.setValue(tempVo.getDefaultFontColour()); FlashingKPITextCoulourVo tempKpiVo = new FlashingKPITextCoulourVo(); tempKpiVo.setBreachWarningFlashingTest(tempVo.getBreachWarningFlashingText()); tempKpiVo.setBreachedKPIFlashingText(tempVo.getBreachedKPIFlashingText()); row.setIdentifier(tempKpiVo); //------------------------- }