Package com.day.cq.wcm.api.components

Examples of com.day.cq.wcm.api.components.IncludeOptions


      decorationEnabled = isDecorationEnabled(componentConfiguration.getDecorationModes(), wcmMode);
    } else {
      decorationEnabled = this.enableDecoration;
    }

    IncludeOptions options = IncludeOptions.getOptions(request, true);
    if (!decorationEnabled) {
      options.forceSameContext(true);
    }

    boolean wcmDisabled;
    if (this.disableWcm == null) {
      wcmDisabled = componentConfiguration.isDisableWcm(); // default is in componentConfiguration
    } else {
      wcmDisabled = this.disableWcm;
    }

    if (wcmDisabled) {
      WCMMode.DISABLED.toRequest(request);
    }
    try {
      String[] componentAdditionalCssClassNames = componentConfiguration.getAdditionalCssClassNames();
      if ((null != componentAdditionalCssClassNames) && (componentAdditionalCssClassNames.length > 0)) {
        options.getCssClassNames().addAll(Arrays.asList(componentAdditionalCssClassNames));
      }

      if ((null != additionalCssClassNames) && (additionalCssClassNames.length > 0)) {
        options.getCssClassNames().addAll(Arrays.asList(additionalCssClassNames));
      }

      wcmIncludeTag.setResourceType(resourceType);
      return wcmIncludeTag.doEndTag();
    } finally {
View Full Code Here


      decorationEnabled = isDecorationEnabled(componentConfiguration.getDecorationModes(), wcmMode);
    } else {
      decorationEnabled = this.enableDecoration;
    }

    IncludeOptions options = IncludeOptions.getOptions(request, true);
    if (!decorationEnabled) {
      options.forceSameContext(true);
      options.setDecorationTagName("");
    }

    boolean wcmDisabled;
    if (this.disableWcm == null) {
      wcmDisabled = componentConfiguration.isDisableWcm(); // default is in componentConfiguration
    } else {
      wcmDisabled = this.disableWcm;
    }

    if (wcmDisabled) {
      WCMMode.DISABLED.toRequest(request);
    }
    try {
      String[] componentAdditionalCssClassNames = componentConfiguration.getAdditionalCssClassNames();
      if ((null != componentAdditionalCssClassNames) && (componentAdditionalCssClassNames.length > 0)) {
        options.getCssClassNames().addAll(Arrays.asList(componentAdditionalCssClassNames));
      }

      if ((null != additionalCssClassNames) && (additionalCssClassNames.length > 0)) {
        options.getCssClassNames().addAll(Arrays.asList(additionalCssClassNames));
      }

      wcmIncludeTag.setResourceType(resourceType);
      return wcmIncludeTag.doEndTag();
    } finally {
View Full Code Here

TOP

Related Classes of com.day.cq.wcm.api.components.IncludeOptions

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.