congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
AbstractEditor.getItem
Code IndexAdd Tabnine 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)

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

  • Finding current android device location
  • compareTo (BigDecimal)
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Reference (javax.naming)
  • JTable (javax.swing)
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now