本文整理了Java中org.nuxeo.ecm.platform.actions.Action.getLink()
方法的一些代码示例,展示了Action.getLink()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Action.getLink()
方法的具体详情如下:
包路径:org.nuxeo.ecm.platform.actions.Action
类名称:Action
方法名:getLink
[英]Returns the link for this action.
Since 5.7.3, fallbacks on properties when link is not set and retrieve it using key "link".
[中]返回此操作的链接。
从5.7.3开始,当未设置链接时,使用属性回退,并使用键“link”检索它。
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-core
/**
* Returns all popup actions: used to construct HTML menu template.
*/
public List<Action> getUnfiltredPopupActions() {
if (unfiltredActions == null) {
computeUnfiltredPopupActions();
}
// post filters links to add docId
for (Action act : unfiltredActions) {
String lnk = act.getLink();
if (lnk.startsWith("javascript:")) {
lnk = lnk.replaceFirst("javascript:", "");
act.setLink(lnk);
}
}
return unfiltredActions;
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-actions-core
/**
* Displays specific help messages for migration of actions.
*
* @since 6.0
*/
protected boolean applyCustomCompatibility(String compatType, Action action) {
// 6.0 BBB: home/admin tab actions migrated to widgets
if ("admin_rest_document_link".equals(compatType) || "home_rest_document_link".equals(compatType)) {
boolean applied = false;
String link = action.getLink();
if (link != null && !link.startsWith("/")) {
action.setLink("/" + link);
applied = true;
}
if (applied) {
log.warn(String.format(
"Applied compatibility to action '%s', its configuration "
+ "should be reviewed: make sure the link references an " + "absolute path",
action.getId()));
return true;
}
}
return false;
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-webapp-base
public String getViewFor(Action mainTabAction) {
if (!mainTabAction.getId().equals(WebActions.DOCUMENTS_MAIN_TAB_ID)) {
return mainTabAction.getLink();
}
DocumentModel doc = getDocumentFor(mainTabAction.getId(), navigationContext.getCurrentDocument());
if (doc != null) {
TypeInfo typeInfo = doc.getAdapter(TypeInfo.class);
return typeInfo.getDefaultView();
}
return DEFAULT_VIEW;
}
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-actions-core
String newLink = source.getLink();
if (newLink != null && !newLink.equals(dest.getLink())) {
dest.setLink(newLink);
代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-actions-jsf
props.put("onclick", actionInstance.getConfirm());
props.put("accessKey", actionInstance.getAccessKey());
props.put("link", actionInstance.getLink());
props.put("actionId", actionInstance.getId());
props.put("action", actionInstance);
内容来源于网络,如有侵权,请联系作者删除!