Package org.jbpm.formapi.client.bus.ui

Examples of org.jbpm.formapi.client.bus.ui.NotificationEvent


            public void onSuccess(Method method, String response) {
                try {
                    List<FBValidationItem> retval = helper.readValidations(response);
                    bus.fireEvent(new ExistingValidationsResponseEvent(retval));
                } catch (Exception e) {
                    bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.CouldntDecodeValidations(), e));
                }
            }
        });
    }
View Full Code Here


            public void onSuccess(Method method, String response) {
                if (method.getResponse().getStatusCode() == Response.SC_OK) {
                    List<FormRepresentation> list = helper.readForms(response);
                    bus.fireEvent(new LoadServerFormResponseEvent(list.isEmpty() ? null : list.iterator().next()));
                } else {
                    bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.CouldntFindForm404(formName)));
                }
            }
        });
    }
View Full Code Here

            public void onSuccess(Method method, String response) {
                if (method.getResponse().getStatusCode() == Response.SC_OK) {
                    List<FormRepresentation> list = helper.readForms(response);
                    bus.fireEvent(new LoadServerFormResponseEvent(list));
                } else {
                    bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.CouldntFindForms404()));
                }
            }
        });
    }
View Full Code Here

                    RootPanel.get().add(auxiliarForm);
                    auxiliarForm.submit();
                }
            });
        } catch (FormEncodingException e) {
            bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.CouldntDecodeForm(), e));
        }
    }
View Full Code Here

                                    break;
                                }
                            }
                            table.removeRow(rowNumber);
                        } catch (FormBuilderException e) {
                            bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.Error(e.getMessage()), e));
                        }
                    }
                });
                dialog.show();
            }
View Full Code Here

   
    private void getTemplate(FormRepresentation form) {
        try {
            server.loadFormTemplate(form, language);
        } catch (FormBuilderException e) {
            bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.UnexpectedWhileExportForm(this.saveType), e));
        }
    }
View Full Code Here

                FormRepresentation form = (FormRepresentation) event.getData("form");
                if (form != null) {
                    try {
                        service.saveForm(form);
                    } catch (FormBuilderException e) {
                        bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.ProblemRestoringForm(), e));
                    }
                }
            }
            @Override
            public void onEvent(UndoableEvent event) { }
            @Override
            public void doAction(UndoableEvent event) {
                FormRepresentation form = (FormRepresentation) event.getData("form");
                try {
                    service.deleteForm(form);
                } catch (FormBuilderException e) {
                    event.setData("form", null);
                    bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.ProblemDeletingForm(), e));
                }
            }
        }));
    }
View Full Code Here

                String formName = event.getFormName();
                if (formName != null) {
                    try {
                        service.getForm(formName);
                    } catch (FormBuilderException e) {
                        bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.CouldntLoadForm(formName), e));
                    }
                } else {
                    try {
                        service.getForms();
                    } catch (FormBuilderException e) {
                        bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.CouldntLoadAllForms(), e));
                    }
                }
            }
        });
        bus.addHandler(LoadServerFormResponseEvent.TYPE, new LoadServerFormResponseHandler() {
View Full Code Here

            try {
                form.populate(panel.getFormName(), panel.getTaskId(), panel.getProcessId(),
                        panel.getAction(), panel.getMethod(), panel.getEnctype(),
                        panel.getDocumentation());
                service.saveForm(form);
                bus.fireEvent(new NotificationEvent(Level.INFO, i18n.FormSavedSuccessfully(form.getName())));
            } catch (FormBuilderException e) {
                bus.fireEvent(new NotificationEvent(Level.ERROR, i18n.ProblemSavingForm(form.getName()), e));
            }
        } else {
            bus.fireEvent(new NotificationEvent(Level.WARN, i18n.DefineFormNameFirst()));
        }
    }
View Full Code Here

            grid.setWidget(row, col, item);
            locations.put(currentPosition, item);
            currentPosition = null;
            return super.add(item);
        } else {
            bus.fireEvent(new NotificationEvent(NotificationEvent.Level.WARN, i18n.BorderLayoutPositionPopulated()));
            return false;
        }
    }
View Full Code Here

TOP

Related Classes of org.jbpm.formapi.client.bus.ui.NotificationEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.