Package pl.net.bluesoft.rnd.processtool.ui.widgets

Examples of pl.net.bluesoft.rnd.processtool.ui.widgets.ProcessToolGuiCallback


        addComponent(new Label(getMessage("dict.help.short")));
        addComponent(tabSheet);
    }

    private void loadData() {
        transactionProvider.withTransaction(new ProcessToolGuiCallback() {
            @Override
            public void callback(ProcessToolContext ctx, ProcessToolBpmSession session) {
                Collection<ProcessDefinitionConfig> configs = ctx.getProcessDefinitionDAO().getActiveConfigurations();
                processContainer.addAll(configs);
                for (ProcessDefinitionConfig config : processContainer.getItemIds()) {
View Full Code Here


        for (ProcessDBDictionaryItemExtension ext : itemValue.getExtensions().values()) {
          ext.setItemValue(itemValue);
        }
      }
    }
    transactionProvider.withTransaction(new ProcessToolGuiCallback() {
      @Override
      public void callback(ProcessToolContext ctx, ProcessToolBpmSession session) {
        ctx.getProcessDictionaryDAO().updateDictionary(item.getDictionary());
      }
    });
View Full Code Here

  public void handleItemDelete(DBDictionaryItemWrapper wrapper) {
    ProcessDBDictionaryItem item = wrapper.getWrappedObject();
    final ProcessDBDictionary dictionary = item.getDictionary();
    dictionary.removeItem(item.getKey());
    item.setDictionary(null);
    transactionProvider.withTransaction(new ProcessToolGuiCallback() {
      @Override
      public void callback(ProcessToolContext ctx, ProcessToolBpmSession session) {
        ctx.getProcessDictionaryDAO().updateDictionary(dictionary);
      }
    });
View Full Code Here

  private RenderParams createParams() {
    RenderParams params = new RenderParams() {
      @Override
      public void withTransaction(final TransactionCallback callback) {
        transactionProvider.withTransaction(new ProcessToolGuiCallback() {
          @Override
          public void callback(ProcessToolContext ctx, ProcessToolBpmSession session) {
            callback.invoke(ctx, session);
          }
        });
View Full Code Here

    }

    private void loadData() {
        container.removeAllItems();
        userDataContainer.removeAllItems();
        transactionProvider.withTransaction(new ProcessToolGuiCallback() {
            @Override
            public void callback(ProcessToolContext ctx, ProcessToolBpmSession session) {
                container.addAll(ctx.getUserSubstitutionDAO().findAllEagerUserFetch());
                usersByLogin = Maps.collectionToMap(LiferayBridge.getAllUsersByCurrentUser(session.getUser(ctx)), "login");
                userDataContainer.addAll(usersByLogin.values());
View Full Code Here

    }

    private void saveSubstitution(final UserSubstitution item) {
        item.setDateFrom(truncHours(item.getDateFrom()));
        item.setDateTo(truncHours(item.getDateTo()));
        transactionProvider.withTransaction(new ProcessToolGuiCallback() {
            @Override
            public void callback(ProcessToolContext ctx, ProcessToolBpmSession session) {
                item.setUser(ctx.getUserDataDAO().loadOrCreateUserByLogin(item.getUser()));
                item.setUserSubstitute(ctx.getUserDataDAO().loadOrCreateUserByLogin(item.getUserSubstitute()));
                ctx.getUserSubstitutionDAO().saveOrUpdate(item);
View Full Code Here

                b.addListener(new Button.ClickListener() {
                    @Override
                    public void buttonClick(Button.ClickEvent event) {
                        final UserSubstitution item = (UserSubstitution)container.getItem(itemId).getBean();
                        container.removeItem(itemId);
                        transactionProvider.withTransaction(new ProcessToolGuiCallback() {
                            @Override
                            public void callback(ProcessToolContext ctx, ProcessToolBpmSession session) {
                ctx.getUserSubstitutionDAO().deleteById(item.getId());                               
                            }
                        });
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.ui.widgets.ProcessToolGuiCallback

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.