Examples of InitFile


Examples of railo.runtime.customtag.InitFile

 
  public static InitFile createInitFile(PageContext pageContext,boolean isweb,String filename) {
      ConfigWebImpl config = (ConfigWebImpl) pageContext.getConfig();
      Mapping mapping=isweb?config.getTagMapping():config.getServerTagMapping();
     
      return new InitFile(
          mapping.getPageSource(filename),
          filename,
          filename.endsWith('.'+config.getCFCExtension()));
    
    }
View Full Code Here

Examples of railo.runtime.customtag.InitFile

      PageSource ps;
      for(int rp=0;rp<realPathes.length;rp++){
        for(int fn=0;fn<filenames.length;fn++){
              ps=((PageContextImpl)pageContext).getRelativePageSourceExisting(realPathes[rp]+filenames[fn]);
              if(ps!=null){
                source=new InitFile(ps,filenames[fn],filenames[fn].endsWith('.'+config.getCFCExtension()));
                return;
              }
      }
      }
     
View Full Code Here

Examples of railo.runtime.customtag.InitFile

  }
 
  public InitFile getCTInitFile(PageContext pc,String key) {
    if(ctPatchCache==null) return null;
   
    InitFile initFile = ctPatchCache.get(key.toLowerCase());
    if(initFile!=null){
      if(MappingImpl.isOK(initFile.getPageSource()))return initFile;
      ctPatchCache.remove(key.toLowerCase());
    }
    return null;
  }
View Full Code Here

Examples of railo.runtime.customtag.InitFile

    TagLibTagAttr attrIsWeb = tag.getAttribute("__isweb");
   
    String filename = Caster.toString(attrFilename.getDefaultValue());
    String name = Caster.toString(attrFilename.getDefaultValue());
    boolean isWeb = Caster.toBooleanValue(attrIsWeb.getDefaultValue());
    InitFile source = CFTagCore.createInitFile(pc, isWeb, filename);
   
    Component cfc = ComponentLoader.loadComponent(pc,null,source.getPageSource(), source.getFilename().substring(0,source.getFilename().length()-(pc.getConfig().getCFCExtension().length()+1)), false,true);
        ComponentWrap cw=ComponentWrap.toComponentWrap(Component.ACCESS_PRIVATE, cfc);
    Struct metadata=Caster.toStruct(cw.get("metadata",null),null,false);
   
   
    Struct sct=new StructImpl();
View Full Code Here

Examples of railo.runtime.customtag.InitFile

              PageSource[] sources = ((PageContextImpl)pageContext).getPageSources(template);
              PageSource ps = MappingImpl.isOK(sources);
             
              if(ps==null)
          throw new MissingIncludeException(sources[0],"could not find template ["+template+"], file ["+sources[0].getDisplayPath()+"] doesn't exist");
              source=new InitFile(ps,template,template.endsWith('.'+pageContext.getConfig().getCFCExtension()));
            }
            else {
              source=new InitFile(pageContext.getCurrentPageSource().getRealPage(template),template,StringUtil.endsWithIgnoreCase(template,'.'+pageContext.getConfig().getCFCExtension()));
              if(!MappingImpl.isOK(source.getPageSource())){
          throw new MissingIncludeException(source.getPageSource(),"could not find template ["+template+"], file ["+source.getPageSource().getDisplayPath()+"] doesn't exist");
              }
            }
       
            //attributesScope.removeEL(TEMPLATE);
            setAppendix(source.getPageSource());
      }
      else if(objName!=null) {
      attributesScope.removeEL(KeyConstants._name);
          String[] filenames = toRealPath(config,objName.toString());
          boolean exist=false;
         
          // appcontext mappings
          Mapping[] ctms = pageContext.getApplicationContext().getCustomTagMappings();
          if(ctms!=null) {
            outer:for(int f=0;f<filenames.length;f++){
              for(int i=0;i<ctms.length;i++){
                  source=new InitFile(ctms[i].getPageSource(filenames[f]),filenames[f],filenames[f].endsWith('.'+config.getCFCExtension()));
                  if(MappingImpl.isOK(source.getPageSource())) {
                    exist=true;
                    break outer;
                  }
                }
            }
          }
         
          // config mappings
          if(!exist) {
            ctms = config.getCustomTagMappings();
            outer:for(int f=0;f<filenames.length;f++){
                for(int i=0;i<ctms.length;i++){// TODO optimieren siehe CFTag
                  source=new InitFile(ctms[i].getPageSource(filenames[f]),filenames[f],filenames[f].endsWith('.'+config.getCFCExtension()));
                  if(MappingImpl.isOK(source.getPageSource())) {
                    exist=true;
                    break outer;
                  }
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.