當前位置: 首頁>>代碼示例>>Java>>正文


Java AuthoringUIMode.CLASSIC屬性代碼示例

本文整理匯總了Java中com.day.cq.wcm.api.AuthoringUIMode.CLASSIC屬性的典型用法代碼示例。如果您正苦於以下問題:Java AuthoringUIMode.CLASSIC屬性的具體用法?Java AuthoringUIMode.CLASSIC怎麽用?Java AuthoringUIMode.CLASSIC使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在com.day.cq.wcm.api.AuthoringUIMode的用法示例。


在下文中一共展示了AuthoringUIMode.CLASSIC屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: execute

@Override
public CharSequence execute(final Object valueObj)
        throws Exception {

    StringBuffer buffer = new StringBuffer();
    TemplateContentModelImpl contentModel = contentModel();
    SlingHttpServletRequest slingRequest = contentModel.request();

    WCMMode wcmMode = WCMMode.fromRequest(slingRequest);
    ClientLibraryUtil clientLibUtil = new ClientLibraryUtil(htmlLibraryManager, slingRequest);
    clientLibUtil.setOptions(true, true, false, false, false, BLANK);

    if (wcmMode != WCMMode.DISABLED) {
        ComponentContext componentContext = WCMUtils.getComponentContext(slingRequest);
        EditContext editContext = componentContext.getEditContext();
        String dlgPath = null;
        if (editContext != null && editContext.getComponent() != null) {
            dlgPath = editContext.getComponent().getDialogPath();
        }

        if (AuthoringUIMode.fromRequest(slingRequest) == AuthoringUIMode.TOUCH) {
            buffer.append(clientLibUtil.generateClientLibrariesPristine("cq.authoring.page"));
        } else
        if (AuthoringUIMode.fromRequest(slingRequest) == AuthoringUIMode.CLASSIC) {
            buffer.append(clientLibUtil.generateClientLibrariesPristine("cq.wcm.edit"));
            boolean isEditMode = (wcmMode == WCMMode.EDIT) ? true : false;
            String dialogPath = dlgPath == null ? "" : dlgPath;
            buffer.append(this.getJavaScript(slingRequest, isEditMode, dialogPath));
        }
    }

    return new Handlebars.SafeString(buffer);
}
 
開發者ID:DantaFramework,項目名稱:AEM,代碼行數:33,代碼來源:InitScriptHelperFunction.java

示例2: doTag

@Override
public void doTag() throws JspException, IOException {

    classicMode = AuthoringUIMode.fromRequest(getRequest()) == AuthoringUIMode.CLASSIC;
    touchMode = AuthoringUIMode.fromRequest(getRequest()) == AuthoringUIMode.TOUCH;

    getPageContext().setAttribute(JSP_ATTR_AUTHOR_TOUCHI_UI, touchMode);
    getPageContext().setAttribute(JSP_ATTR_AUTHOR_CLASSIC_UI, classicMode);
}
 
開發者ID:headwirecom,項目名稱:aem-solr-search,代碼行數:9,代碼來源:AuthoringUIModeTag.java

示例3: classic

public Builder classic() {
    this.authoringMode = AuthoringUIMode.CLASSIC;
    return this;
}
 
開發者ID:Adobe-Consulting-Services,項目名稱:acs-aem-commons,代碼行數:4,代碼來源:Result.java

示例4: isClassic

/**
 * Checks if the request is in {@link AuthoringUIMode#CLASSIC}
 * 
 * @param request
 *            request to check
 * @return true if the request is in Classic authoring mode
 */
public static boolean isClassic(SlingHttpServletRequest request) {
    return AuthoringUIMode.CLASSIC == AuthoringUIMode.fromRequest(request);
}
 
開發者ID:Adobe-Consulting-Services,項目名稱:acs-aem-commons,代碼行數:10,代碼來源:ModeUtil.java


注:本文中的com.day.cq.wcm.api.AuthoringUIMode.CLASSIC屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。