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

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

Best Java code snippets using com.haulmont.cuba.gui.components.AbstractEditor.getItem (Showing top 11 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.cuba/cuba-gui

@Override
public T getEditedEntity() {
  return getItem();
}
origin: com.haulmont.addon.dashboard/dashboard-web

@Override
public Widget getItem() {
  Widget item = super.getItem();
  item.setCreatedBy(accessHelper.getCurrentSessionLogin());
  return item;
}
origin: com.haulmont.cuba/cuba-gui

public void validateAdditionalRules(ValidationErrors errors) {
  // all previous validations return no errors
  if (crossFieldValidate && errors.isEmpty()) {
    BeanValidation beanValidation = getBeanLocator().get(BeanValidation.NAME);
    Validator validator = beanValidation.getValidator();
    Set<ConstraintViolation<Entity>> violations = validator.validate(getItem(), UiCrossFieldChecks.class);
    violations.stream()
        .filter(violation -> {
          Path propertyPath = violation.getPropertyPath();
          Path.Node lastNode = Iterables.getLast(propertyPath);
          return lastNode.getKind() == ElementKind.BEAN;
        })
        .forEach(violation -> errors.add(violation.getMessage()));
  }
}
origin: com.haulmont.cuba/cuba-web

public void editAttribute() {
  Set<ManagedBeanAttribute> selected = attributesTable.getSelected();
  if (selected.isEmpty()) {
    return;
  }
  ManagedBeanAttribute mba = selected.iterator().next();
  if (!mba.getWriteable()) {
    return;
  }
  AbstractEditor w = openEditor("jmxConsoleEditAttribute", mba, OpenType.DIALOG);
  w.addCloseListener(actionId -> {
    if (Window.COMMIT_ACTION_ID.equals(actionId)) {
      Object item = w.getItem();
      reloadAttribute((ManagedBeanAttribute) item);
    }
  });
}
origin: com.haulmont.cuba/cuba-web

protected void showInfo(Object target) {
  AbstractEditor editor = (AbstractEditor) findEditor((Layout) target);
  Entity entity = editor.getItem();
  Metadata metadata = AppBeans.get(Metadata.NAME);
  MetaClass metaClass = metadata.getSession().getClass(entity.getClass());
  new ShowInfoAction().showInfo(entity, metaClass, editor);
}
origin: com.haulmont.cuba/cuba-gui

protected boolean commitInternal(boolean close) {
  if (!preCommit())
    return false;
  boolean committed;
  DsContext context = getDsContext();
  if (context != null) {
    committed = context.commit();
  } else {
    DataSupplier supplier = getDataService();
    supplier.commit(getItem());
    committed = true;
  }
  return postCommit(committed, close);
}
origin: com.haulmont.cuba/cuba-web

Entity editorItem = editor.getItem();
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.cuba/cuba-gui

Entity editedItem = window.getItem();
if (editedItem != null) {
  if (parentDs == null) {
origin: com.haulmont.cuba/cuba-gui

Entity editedItem = window.getItem();
if (editedItem != null) {
  if (parentDs == null) {
origin: com.haulmont.cuba/cuba-gui

editor.addCloseListener(actionId -> {
  if (Window.COMMIT_ACTION_ID.equals(actionId)) {
    Entity item = editor.getItem();
    afterCommitOpenedEntity(item);
com.haulmont.cuba.gui.componentsAbstractEditorgetItem

Popular methods of AbstractEditor

  • init
  • postInit
    Hook to be implemented in subclasses. Called by #setItem(com.haulmont.cuba.core.entity.Entity). At t
  • 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

  • Creating JSON documents from java classes using gson
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSystemService (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JCheckBox (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
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