/** Запрос параметров отчёта */ private void executeParamsDialog(final RptMain report, final RptProperties properties) { if (report.isAskParams() && properties.isShowParametersDialog()) { ReportParametersDialog dlg = null; if (report.getParamsFormName() != null) // запрос параметров с помощью формы пользователя dlg = (ReportParametersDialog) UIProducer.produceForm(report.getParamsFormName()); else // автоматическое создание формы dlg = (ReportParametersDialog) UIProducer.produceFormFromString( ReportParametersDialogImpl.createForm(report, reportParams)); dlg.addOkActionListener( new FormActionListener() { public void actionPerformed(FormEvent event) { saveParamsValue(report); internalShowReport(report, properties, false); } }); restoreParamsValue(report); dlg.setParameters(reportParams); dlg.execute(); } else internalShowReport(report, properties, false); }
protected void onActionGrantRights(WidgetEvent event) { if (currentRightIds != null && currentRightIds.length != 0) { final DocFlowStageRightsDialog rightDialog = (DocFlowStageRightsDialog) UIProducer.produceForm( "com/mg/merp/docflow/resources/DocFlowStageRightsDialog.mfd.xml"); rightDialog.addOkActionListener( new FormActionListener() { public void actionPerformed(FormEvent event) { List<DocProcessStageRights> rights = new ArrayList<DocProcessStageRights>(); for (int rightId : currentRightIds) rights.add( ServerUtils.getPersistentManager().find(DocProcessStageRights.class, rightId)); DocFlowStageServiceLocal service = (DocFlowStageServiceLocal) ApplicationDictionaryLocator.locate() .getBusinessService(DOCFLOW_STAGE_SERVICE_NAME); service.grantRights( rights.toArray(new DocProcessStageRights[rights.size()]), rightDialog.getGrants()); refreshRights(); } }); rightDialog.run(true); } }
/* (non-Javadoc) * @see com.mg.framework.generic.ui.AbstractSearchHelp#doSearch() */ @Override protected void doSearch() throws Exception { FeeRefSearchForm searchForm = (FeeRefSearchForm) UIProducer.produceForm(FORM_NAME); searchForm.addSearchHelpListener(this); searchForm.run(UIUtils.isModalMode()); }