org.nuxeo.ecm.platform.actions.Action.setLabel()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(159)

本文整理了Java中org.nuxeo.ecm.platform.actions.Action.setLabel()方法的一些代码示例,展示了Action.setLabel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Action.setLabel()方法的具体详情如下:
包路径:org.nuxeo.ecm.platform.actions.Action
类名称:Action
方法名:setLabel

Action.setLabel介绍

暂无

代码示例

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-actions-core

public synchronized void addAction(Action action) {
  String id = action.getId();
  if (log.isDebugEnabled()) {
    if (actions.containsKey(id)) {
      log.debug("Overriding action: " + action);
    } else {
      log.debug("Registering action: " + action);
    }
  }
  // add a default label if not set
  if (action.getLabel() == null) {
    action.setLabel(action.getId());
  }
  actions.put(id, action);
  for (String category : action.getCategories()) {
    List<String> acts = categories.get(category);
    if (acts == null) {
      acts = new ArrayList<>();
    }
    if (!acts.contains(id)) {
      acts.add(id);
    }
    categories.put(category, acts);
  }
}

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base

/**
 * Helper to register a simple action based on the given descriptor
 *
 * @since 6.0
 */
protected Action getAction() {
  Action a = new Action(ACTION_ID_PREFIX + getTreeId(),
      new String[] { DirectoryTreeDescriptor.NAV_ACTION_CATEGORY });
  a.setType("rest_document_link");
  a.setLabel(getTreeLabel());
  Map<String, String> props = new HashMap<String, String>();
  props.put("ajaxSupport", "true");
  if (isDirectoryTreeBased()) {
    props.put("link", "/incl/single_directory_tree_explorer.xhtml");
  } else {
    props.put("link", getXhtmlview());
  }
  ActionPropertiesDescriptor pdesc = new ActionPropertiesDescriptor();
  pdesc.setProperties(props);
  a.setPropertiesDescriptor(pdesc);
  Integer order = getOrder();
  if (order != null) {
    a.setOrder(order.intValue());
  }
  a.setEnabled(isEnabled());
  a.setIcon(String.format("/img/%s.png", getTreeId()));
  // need to set a non-empty list
  a.setFilterIds(new ArrayList<String>());
  return a;
}

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-document-routing-web

String id = getTaskActionId(task, buttonId);
Action action = new Action(id, Action.EMPTY_CATEGORIES);
action.setLabel(button.getLabel());
Map<String, Serializable> actionProps = new HashMap<String, Serializable>();
actionProps.put("buttonId", buttonId);

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base

a.setLabel(getLabel());
Map<String, String> props = new HashMap<String, String>();
props.put("ajaxSupport", "true");

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-document-routing-web

Action action = new Action(button.getName(),
    Action.EMPTY_CATEGORIES);
action.setLabel(button.getLabel());
boolean displayAction = true;
if (StringUtils.isNotEmpty(button.getFilter())) {

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-actions-core

dest.setLabel(newLabel);

相关文章