Codota Logo
AbstractEditor.postInit
Code IndexAdd Codota to your IDE (free)

How to use
postInit
method
in
com.haulmont.cuba.gui.components.AbstractEditor

Best Java code snippets using com.haulmont.cuba.gui.components.AbstractEditor.postInit (Showing top 10 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: com.haulmont.bpm/bpm-gui

@Override
protected void postInit() {
  super.postInit();
  initProcTaskActionsFrame();
}
origin: com.haulmont.cuba/cuba-gui

@Override
protected void postInit() {
  super.postInit();
  if (!PersistenceHelper.isNew(getItem())) {
    substUser.setEditable(false);
  }
}
origin: com.haulmont.cuba/cuba-web

@Override
protected void postInit() {
  super.postInit();
  passwordField.setValue(getItem().getPassword());
}
origin: com.haulmont.reports/reports-gui

@Override
protected void postInit() {
  super.postInit();
  initFunctionField();
  propertyDs.addItemPropertyChangeListener(e -> {
    if ("type".equals(e.getProperty())) {
      initFunctionField();
    }
  });
}
origin: com.haulmont.addon.dashboard/dashboard-web

@Override
protected void postInit() {
  super.postInit();
  initParameter();
  typeLookup.addValueChangeListener(e -> parameterTypeChanged((ParameterType) e.getValue()));
}
origin: com.haulmont.cuba/cuba-gui

/**
 * Called by the framework to set an edited entity after creation of all components and datasources, and after
 * {@link #init(java.util.Map)}.
 * <p>Don't override this method in subclasses, use hooks {@link #initNewItem(com.haulmont.cuba.core.entity.Entity)}
 * and {@link #postInit()} instead.</p>
 * @param item  entity instance
 */
@SuppressWarnings("unchecked")
@Override
public void setItem(Entity item) {
  if (PersistenceHelper.isNew(item)) {
    DatasourceImplementation parentDs = (DatasourceImplementation) getParentDs();
    if (parentDs == null || !parentDs.getItemsToCreate().contains(item)) {
      initNewItem((T) item);
    }
  }
  setItemInternal(item);
  postInit();
}
origin: com.haulmont.reports/reports-gui

@Override
protected void postInit() {
  super.postInit();
  initUploadField();
  templateDs.addItemPropertyChangeListener(e -> {
    ReportTemplate reportTemplate = getItem();
    if ("reportOutputType".equals(e.getProperty())) {
      ReportOutputType prevOutputType = (ReportOutputType) e.getPrevValue();
      ReportOutputType newOutputType = (ReportOutputType) e.getValue();
      setupVisibility(reportTemplate.getCustom(), newOutputType);
      if (hasHtmlCsvTemplateOutput(prevOutputType) && !hasTemplateOutput(newOutputType)) {
        showMessageDialog(getMessage("templateEditor.warning"), getMessage("templateEditor.clearTemplateMessage"), MessageType.CONFIRMATION);
      }
    } else if ("custom".equals(e.getProperty())) {
      setupVisibility(Boolean.TRUE.equals(e.getValue()), reportTemplate.getReportOutputType());
    }
  });
  initOutputTypeList();
}
origin: com.haulmont.addon.dashboard/dashboard-web

@Override
protected void postInit() {
  super.postInit();
  if (PersistenceHelper.isNew(getItem())) {
    getItem().setCreatedBy(accessHelper.getCurrentSessionLogin());
  }
  if (StringUtils.isNotEmpty(widgetTemplateDs.getItem().getWidgetModel())) {
    Widget widget = converter.widgetFromJson(widgetTemplateDs.getItem().getWidgetModel());
    setWidgetTypeLookupValue(widget, widgetTypeLookup);
  }
  editWidgetButton.setAction(new BaseAction("openWidgetEditor") {
    @Override
    public void actionPerform(Component component) {
      WidgetTemplate widgetTemplate = widgetTemplateDs.getItem();
      if (StringUtils.isNotEmpty(widgetTemplate.getWidgetModel())) {
        Widget widget = converter.widgetFromJson(widgetTemplateDs.getItem().getWidgetModel());
        openWidgetEditor(widget);
      }
    }
  });
  if (!accessHelper.getCurrentSessionLogin().equals(getItem().getCreatedBy())) {
    fieldGroup.getField("isAvailableForAllUsers").setVisible(false);
  }
  openWidgetEditor = true;
  ((AbstractDatasource) widgetTemplateDs).setModified(false);
}
origin: com.haulmont.cuba/cuba-gui

/**
 * Hook to be implemented in subclasses. Called by the framework after committing datasources.
 * The default implementation notifies about commit and calls {@link #postInit()} if the window is not closing.
 *
 * @param committed whether any data were actually changed and committed
 * @param close     whether the window is going to be closed
 * @return true to continue, false to abort
 */
protected boolean postCommit(boolean committed, boolean close) {
  if (committed && !close) {
    if (showSaveNotification) {
      Entity entity = getItem();
      MetadataTools metadataTools = getBeanLocator().get(MetadataTools.class);
      showNotification(
          messages.formatMainMessage("info.EntitySave",
              messages.getTools().getEntityCaption(entity.getMetaClass()),
              metadataTools.getInstanceName(entity)),
          NotificationType.TRAY);
    }
    postInit();
    afterWindowApplyPostInit();
  }
  return true;
}
origin: com.haulmont.reports/reports-gui

@Override
protected void postInit() {
  super.postInit();
  ((CollectionPropertyDatasourceImpl) treeDs).setModified(false);
  ((DatasourceImpl) reportDs).setModified(false);
  bandTree.getDatasource().refresh();
  bandTree.expandTree();
  bandTree.setSelected(reportDs.getItem().getRootBandDefinition());
  bandEditor.setBandDefinition(bandTree.getSingleSelected());
  if (bandTree.getSingleSelected() == null) {
    bandEditor.setEnabled(false);
  }
  setupDropZoneForTemplate();
  initValidationScriptGroupBoxCaption();
}
com.haulmont.cuba.gui.componentsAbstractEditorpostInit

Javadoc

Hook to be implemented in subclasses. Called by #setItem(com.haulmont.cuba.core.entity.Entity). At the moment of calling the main datasource is initialized and #getItem() returns reloaded entity instance.
This method can be called second time by #postCommit(boolean,boolean) if the window is not closed after commit. Then #getItem() contains instance, returned from DataService.commit(). This is useful for initialization of components that have to show fresh information from the current instance.
Example:
 
protected void postInit() { 
if (!PersistenceHelper.isNew(getItem())) { 
diffFrame.loadVersions(getItem()); 
entityLogDs.refresh(); 
} 
} 

Popular methods of AbstractEditor

  • init
  • getItem
  • postCommit
    Hook to be implemented in subclasses. Called by the framework after committing datasources. The defa
  • preCommit
    Hook to be implemented in subclasses. Called by the framework when all validation is done and dataso
  • setItem
    Called by the framework to set an edited entity after creation of all components and datasources, an
  • addCloseListener
  • close
  • commit
    Commit changes with optional validation.Don't override this method in subclasses, use hooks #postVal
  • postValidate
  • validateAll
  • addAfterCloseListener
  • addCloseWithCommitListener
  • addAfterCloseListener,
  • addCloseWithCommitListener,
  • addInitListener,
  • afterWindowApplyPostInit,
  • closeWithCommit,
  • commitAndClose,
  • commitInternal,
  • getBeanLocator,
  • getContext

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • setContentView (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Set (java.util)
    A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now