Tabnine Logo
ViewRepository.getViewNames
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: com.haulmont.cuba/cuba-rest-api

  public String getAllViewsForMetaClass(String entityName) {
    MetaClass metaClass = restControllersUtils.getMetaClass(entityName);
    StringBuilder sb = new StringBuilder();
    sb.append("[");
    List<String> jsonViews = new ArrayList<>();
    for (String viewName : viewRepository.getViewNames(metaClass)) {
      View view = viewRepository.getView(metaClass, viewName);
      jsonViews.add(viewSerializationAPI.toJson(view));
    }
    sb.append(Joiner.on(",").join(jsonViews));
    sb.append("]");
    return sb.toString();
  }
}
origin: com.haulmont.addon.dashboard/dashboard-web

protected void loadViewNames(MetaClass metaClass) {
  List<String> viewNames = new ArrayList<>(metadata.getViewRepository().getViewNames(metaClass));
  viewLookup.setOptionsList(viewNames);
}
origin: com.haulmont.addon.admintools/cuba-at-gui

  protected void setEntityViewsLookup() {
    List<String> views = new LinkedList<>();
    views.add(View.MINIMAL);
    views.add(View.LOCAL);
    views.addAll(metadata.getViewRepository().getViewNames((MetaClass) entitiesMetaClasses.getValue()));

    entityViews.setOptionsList(views);
    entityViews.setValue(View.LOCAL);
  }
}
origin: com.haulmont.reports/reports-gui

protected void refreshViewNames(@Nullable ReportInputParameter reportInputParameter) {
  if (reportInputParameter != null) {
    if (StringUtils.isNotBlank(reportInputParameter.getEntityMetaClass())) {
      MetaClass parameterMetaClass = metadata.getClass(reportInputParameter.getEntityMetaClass());
      Collection<String> viewNames = metadata.getViewRepository().getViewNames(parameterMetaClass);
      Map<String, Object> views = new HashMap<>();
      for (String viewName : viewNames) {
        views.put(viewName, viewName);
      }
      views.put(View.LOCAL, View.LOCAL);
      views.put(View.MINIMAL, View.MINIMAL);
      viewNameLookup.setOptionsMap(views);
      return;
    }
  }
  viewNameLookup.setOptionsMap(new HashMap<>());
}
com.haulmont.cuba.core.globalViewRepositorygetViewNames

Javadoc

Returns names of views defined for the metaClass

Popular methods of ViewRepository

  • getView
    Get View for an entity.
  • findView
    Searches for a View for an entity.

Popular in Java

  • Reading from database using SQL prepared statement
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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