Package com.adaptrex.core

Examples of com.adaptrex.core.AdaptrexConfig


    this.contextPath = request.getContextPath();
    this.setNamespace(namespace);
  };
 
  public String toString() {
    AdaptrexConfig config = AdaptrexRegistry.getConfig();
   
    StringBuilder output = new StringBuilder("\n");
   
    String contextPathOut = this.contextPath;
   
    String extVersionOut = this.extVersion;
    if (extVersionOut == null) extVersionOut = config.get(AdaptrexConfig.EXT_VERSION);
   
    String extBuildOut = this.extBuild;
    if (extBuildOut == null) extBuildOut = config.get(AdaptrexConfig.EXT_BUILD, "production");
   
    String webLibPathOut = this.weblibPath;
    if (webLibPathOut == null) webLibPathOut = config.get(AdaptrexConfig.WEBLIB, "lib");
   
    String senchaTouchVersionOut = this.senchaTouchVersion;
    if (senchaTouchVersionOut == null) senchaTouchVersionOut = config.get(AdaptrexConfig.SENCHATOUCH_VERSION);

    String senchaTouchPathOut = this.senchaTouchPath;
    if (senchaTouchPathOut == null) senchaTouchPathOut = config.get(AdaptrexConfig.SENCHATOUCH_PATH);
   
   
    if (!this.touch){
      /*
       * Ext Desktop
       */
      String extPathOut = this.extPath;
      if (extPathOut == null) extPathOut = config.get(AdaptrexConfig.EXT_PATH);
      if (extPathOut == null && extVersionOut != null) {
        extPathOut = "/extjs-" + extVersionOut + "/ext" + (extBuildOut.equals("production") ? "" : "-" + extBuildOut) + ".js";
      }
     
      String extThemeOut = null;
      String extFolder = null;
      if (extPathOut != null) {
        extFolder = extPathOut.substring(0, extPathOut.lastIndexOf("/"));
       
        extThemeOut = this.extTheme;
        if (extThemeOut == null) extThemeOut = config.get(AdaptrexConfig.EXT_THEME, "all");
        if (!extThemeOut.contains("/")) {
          extThemeOut = extFolder + "/resources/css/ext-" + extThemeOut + ".css";
       
      }
     
View Full Code Here


    @SuppressWarnings("unchecked")
  @Override
    public void encodeBegin(FacesContext context) throws IOException {
      try {
    Adaptrex adaptrex = Adaptrex.getAdaptrex();
    AdaptrexConfig config = adaptrex.getConfig();
   
          Map<String,Object> a = getAttributes();
         
          Map<String,Object> extConfig = new HashMap<String,Object>();
          if (adaptrex.getConfig().get("ext") != null) {
            extConfig.putAll((Map<String,Object>) config.get("ext"));
          }
         
          /*
           * If we're configuring Ext, do it here
           */
 
View Full Code Here

  public ConfigComponent(HttpServletRequest request) {
    this.contextPath = request.getContextPath();
  };
 
  public String toString() {
    AdaptrexConfig config = AdaptrexServices.getConfig();
   
    StringBuilder output = new StringBuilder("\n");
   
    String contextPathOut = this.contextPath;
   
    String extVersionOut = this.extVersion;
    if (extVersionOut == null) extVersionOut = config.get(AdaptrexConfig.EXT_VERSION);
   
    String extBuildOut = this.extBuild;
    if (extBuildOut == null) extBuildOut = config.get(AdaptrexConfig.EXT_BUILD, "production");
   
    String webLibPathOut = this.weblibPath;
    if (webLibPathOut == null) webLibPathOut = config.get(AdaptrexConfig.WEBLIB, "lib");
   
    String senchaTouchVersionOut = this.senchaTouchVersion;
    if (senchaTouchVersionOut == null) senchaTouchVersionOut = config.get(AdaptrexConfig.SENCHATOUCH_VERSION);

    String senchaTouchPathOut = this.senchaTouchPath;
    if (senchaTouchPathOut == null) senchaTouchPathOut = config.get(AdaptrexConfig.SENCHATOUCH_PATH);
   
   
    if (!this.touch){
      /*
       * Ext Desktop
       */
      String extPathOut = this.extPath;
      if (extPathOut == null) extPathOut = config.get(AdaptrexConfig.EXT_PATH);
      if (extPathOut == null && extVersionOut != null) {
        extPathOut = "/extjs-" + extVersionOut + "/ext" + (extBuildOut.equals("production") ? "" : "-" + extBuildOut) + ".js";
      }
     
      String extThemeOut = null;
      String extFolder = null;
      if (extPathOut != null) {
        extFolder = extPathOut.substring(0, extPathOut.lastIndexOf("/"));
       
        extThemeOut = this.extTheme;
        if (extThemeOut == null) extThemeOut = config.get(AdaptrexConfig.EXT_THEME, "all");
        if (!extThemeOut.contains("/")) {
          extThemeOut = extFolder + "/resources/css/ext-" + extThemeOut + ".css";
       
      }
     
View Full Code Here

  private static Map<String,ORMPersistenceManager> persistenceManagers
    = new HashMap<String,ORMPersistenceManager>();
 
  public static AdaptrexConfig getConfig() {
    if (config == null) {
      config = new AdaptrexConfig();
    }
    return config;
  }
View Full Code Here

TOP

Related Classes of com.adaptrex.core.AdaptrexConfig

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.