Examples of PageSource


Examples of railo.runtime.PageSource

    PageContextImpl pc = (PageContextImpl) ThreadLocalPageContext.get();
    String template="";
    StackTraceElement trace=null;
    List list=new ArrayList();
    Resource res;
    PageSource ps;
    FDStackFrameImpl frame;
   
   
    for(int i=traces.length-1;i>=0;i--) {
      trace=traces[i];
View Full Code Here

Examples of railo.runtime.PageSource

    StackTraceElement[] traces = pc.getThread().getStackTrace();
    String template="";
    StackTraceElement trace=null;
    ArrayList list=new ArrayList();
    Resource res;
    PageSource ps;
    int index=stack.size();
    for(int i=traces.length-1;i>=0;i--) {
      trace=traces[i];
      ps=null;
      if(trace.getLineNumber()<=0) continue;
      template=trace.getFileName();
      if(template==null || ResourceUtil.getExtension(template,"").equals("java")) continue;
     
      if(index>0)ps=(PageSource) stack.get(--index);
      // inside the if is the old way, that only work when the cfm is inside the mapping, but i'm not shure woth the new way
      if(ps==null || !(ps.getFullClassName().equals(trace.getClassName()) && ps.getDisplayPath().equals(template))){
        res = ResourceUtil.toResourceNotExisting(pc, template);
        ps = pc.toPageSource(res, null);
      }
     
      FDStackFrameImpl frame = new FDStackFrameImpl(this,pc,trace,ps);
View Full Code Here

Examples of railo.runtime.PageSource

    return getTopStackFrame();
  }
 
  @Override
    public IFDStackFrame getTopStackFrame(){
    PageSource ps = pc.getCurrentPageSource();
   
    StackTraceElement[] traces = pc.getThread().getStackTrace();
    String template="";
    StackTraceElement trace=null;
    Resource res;
   
    for(int i=0;i<traces.length;i++) {
      trace=traces[i];
      if(trace.getLineNumber()<=0) continue;
      template=trace.getFileName();
      if(template==null || ResourceUtil.getExtension(template,"").equals("java")) continue;
     
      if(ps==null || !(ps.getFullClassName().equals(trace.getClassName()) && ps.getResource().getAbsolutePath().equals(template))){
        res = ResourceUtil.toResourceNotExisting(pc, template);
        ps = pc.toPageSource(res, null);
      }
      break;
    }
View Full Code Here

Examples of railo.runtime.PageSource

      if(ac==null) ac= pc.getApplicationContext();
     
      // abs path
      if(path.startsWith("/")){
        ConfigWebImpl cwi=(ConfigWebImpl) config;
        PageSource ps = cwi.getPageSourceExisting(
            pc, ac==null?null:ac.getMappings(), path, false, false, true, false);
        //res=cwi.getPhysicalResourceExistingX(
        //    pc,
        //    ac==null?null:ac.getMappings(), path,
        //    false, false, true);
        if(ps!=null){
          res=ps.getResource();
          if(res!=null && (!onlyDir || res.isDirectory())) return res;
        }
       
      }
      // real path
View Full Code Here

Examples of railo.runtime.PageSource

    server.registerTypeMapping(clazz);
    registerTypeMapping(server,clazz);
  }

  public static String getClassname(Component component) {
      PageSource ps = component.getPageSource();
      String path=ps.getDisplayPath();// Must remove webroot
      Config config = ps.getMapping().getConfig();
      String root = config.getRootDirectory().getAbsolutePath();
      if(path.startsWith(root))
        path=path.substring(root.length());

      path=path.replace('\\', '/').toLowerCase();
View Full Code Here

Examples of railo.runtime.PageSource

       
    pc.setFunctionScopes(newLocal,newArgs);
    pci.setActiveUDFCalledName(calledName);
   
    int oldCheckArgs=undefined.setMode(properties.localMode==null?pc.getApplicationContext().getLocalMode():properties.localMode.intValue());
    PageSource psInc=null;
    try {
      PageSource ps = getPageSource();
      if(doIncludePath)psInc = ps;
      //if(!ps.getDisplayPath().endsWith("Dump.cfc"))print.e(getPageSource().getDisplayPath());
      if(doIncludePath && getOwnerComponent()!=null) {
        //if(!ps.getDisplayPath().endsWith("Dump.cfc"))print.ds(ps.getDisplayPath());
        psInc=ComponentUtil.getPageSource(getOwnerComponent());
View Full Code Here

Examples of railo.runtime.PageSource

    return EVAL_PAGE;
  }
 
  public void _doEndTag() throws IOException, PageException {
   
    PageSource page = pageContext.getCurrentTemplatePageSource();
   
    // var
    String varValue=null;
    Object value=null,traceValue=null;
    if(!StringUtil.isEmpty(var)) {
View Full Code Here

Examples of railo.runtime.PageSource

        srcs[i]=ResourceUtil.toResourceExisting(pageContext, strSrcs[i]);
        images[i] = new Image(srcs[i]);
      }
     
      // TODO use the same resource as for cfimage
      PageSource ps = pageContext.getCurrentTemplatePageSource();
      Resource curr = ps.getResource();
      Resource dir = curr.getParentResource();
      Resource cssDir = dir.getRealResource("css");
      Resource pathdir = cssDir;
      cssDir.mkdirs();
     
View Full Code Here

Examples of railo.runtime.PageSource

      //app-String appName=pc.getApplicationContext().getName();
      rawPath=rawPath.trim().replace('\\','/');
      String path=(rawPath.indexOf("./")==-1)?rawPath.replace('.','/'):rawPath;
      String pathWithCFC=path.concat(".cfc");
      boolean isRealPath=!StringUtil.startsWith(pathWithCFC,'/');
      PageSource currPS = pc.getCurrentPageSource();
      Page currP=((PageSourceImpl)currPS).loadPage(pc,(Page)null);
     
      PageSource ps=null;
      Page page=null;
     
      if(searchLocal==null)
        searchLocal=Caster.toBoolean(config.getComponentLocalSearch());
      if(searchRoot==null)
View Full Code Here

Examples of railo.runtime.PageSource

  private static void addTagMetaData(PageContext pc,TagLib tl, TagLibTag tlt, String filename, boolean isWeb) {
      if(pc==null) return;
    try{
      ConfigWebImpl config=(ConfigWebImpl) pc.getConfig();
      PageSource ps = isWeb?
          config.getTagMapping().getPageSource(filename):
          config.getServerTagMapping().getPageSource(filename);
     
      Page p = ps.loadPage(pc);
      ComponentImpl c = ComponentLoader.loadComponent(pc, p, ps, filename, true,true);
      ComponentWrap cw = ComponentWrap.toComponentWrap(Component.ACCESS_PRIVATE,c);
      Struct meta = Caster.toStruct( cw.get(KeyConstants._metadata,null),null);

      // TODO handle all metadata here and make checking at runtime useless
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.