Codota Logo
ViewRepository.findView
Code IndexAdd Codota to your IDE (free)

How to use
findView
method
in
com.haulmont.cuba.core.global.ViewRepository

Best Java code snippets using com.haulmont.cuba.core.global.ViewRepository.findView (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: com.haulmont.cuba/cuba-rest-api

public String getView(String entityName, String viewName) {
  MetaClass metaClass = restControllersUtils.getMetaClass(entityName);
  View view = viewRepository.findView(metaClass, viewName);
  if (view == null) {
    throw new RestAPIException("View not found",
        String.format("View %s for metaClass %s not found", viewName, entityName),
        HttpStatus.NOT_FOUND);
  }
  return viewSerializationAPI.toJson(view);
}
origin: com.haulmont.cuba/cuba-web

protected Entity loadEntityInstance(EntityLoadInfo info) {
  if (info.isNewEntity()) {
    return metadata.create(info.getMetaClass());
  }
  //noinspection unchecked
  LoadContext<Entity> ctx = new LoadContext(info.getMetaClass()).setId(info.getId());
  if (info.getViewName() != null) {
    View view = viewRepository.findView(info.getMetaClass(), info.getViewName());
    if (view != null) {
      ctx.setView(view);
    } else {
      log.warn("Unable to find view \"{}\" for entity \"{}\"", info.getViewName(), info.getMetaClass());
    }
  }
  Entity entity;
  try {
    entity = dataService.load(ctx);
  } catch (Exception e) {
    log.warn("Unable to load item: {}", info, e);
    return null;
  }
  return entity;
}
origin: com.haulmont.cuba/cuba-gui

  );
view = metadata.getViewRepository().findView(getMetaClass(), property.getView().getName());
origin: com.haulmont.reports/reports-core

View reportEditView = viewRepository.findView(savedReport.getMetaClass(), "report.edit");
return dataManager.reload(savedReport, reportEditView, savedReport.getMetaClass(), true);
com.haulmont.cuba.core.globalViewRepositoryfindView

Javadoc

Searches for a View for an entity.

Popular methods of ViewRepository

  • getView
    Get View for an entity.
  • getViewNames
    Returns names of views defined for the entityClass

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
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