@Override public void doOnDelMenuAction(List<EntityTransformerMapping> objects) { if (objects != null && objects.size() > 0) { Integer[] ids = new Integer[objects.size()]; int i = 0; for (EntityTransformerMapping etm : objects) { ids[i] = etm.getId(); i++; } try { Activator.getDefault().deleteBusinessObjectsList(ids); } catch (java.rmi.ConnectException e) { Dialogs.openError( Activator.getDefault().getString(ENTITYMAPPER_DELETE_ERROR), Activator.getDefault().getString(UiPlugin.CHECK_SERVER), Activator.ID, e); } catch (RuntimeException e) { Dialogs.openError( Activator.getDefault().getString(ENTITYMAPPER_DELETE_ERROR), e.getLocalizedMessage(), Activator.ID, e); } catch (Exception e) { Dialogs.openError( UiPlugin.getDefault().getString(UiPlugin.UNKNOWN_EXCEPTION), UiPlugin.getDefault().getString(UiPlugin.UNKNOWN_EXCEPTION), UiPlugin.ID, e); } view.refresh(); } }
/* * (non-Javadoc) * * @see com.mg.merp.wb.core.ui.support.StandartBrowserViewController#refreshView(java.lang.String) */ @Override public void refreshView(String query) { try { EntityTransformerMapping[] etm = Activator.getDefault().synchronize(query); view.getTableViewer().setInput(etm); isSynchronized = true; } catch (Exception e) { isSynchronized = false; Dialogs.openError( Activator.getDefault().getString(GET_ENTITYMAPPER_FAIL), UiPlugin.getDefault().getString(UiPlugin.CHECK_SERVER), Activator.ID, e); } }
@Override public void doOnAddMenuAction() { EntityTransformerMapping r = new EntityTransformerMapping(); r.setMapId(Activator.getDefault().getString(NEW_ENTITYMAPPER)); Activator.openEditor(new EntityMapperEditorInput(r, true), EntityMapperEditorForm.EDITOR_ID); }
/* * (non-Javadoc) * * @see com.mg.merp.wb.core.ui.support.StandartBrowserViewController#storeFilter(java.lang.String[]) */ @Override public void storeFilter(String[] array) { CoreUtils.storeStringArray(Activator.getDefault(), FILTER_ITEMS_KEY, array); }
/* * (non-Javadoc) * * @see com.mg.merp.wb.core.ui.support.StandartBrowserViewController#loadFilter() */ @Override public String[] loadFilter() { return CoreUtils.loadStringArray(Activator.getDefault(), FILTER_ITEMS_KEY); }