Examples of PageSource


Examples of railo.runtime.PageSource

  protected int mode=MODE_CURRENT2ROOT;
 
  @Override
  public void onRequest(PageContext pc, PageSource requestedPage, RequestListener rl) throws PageException {
    // on requestStart
    PageSource appPS=//pc.isCFCRequest()?null:
      AppListenerUtil.getApplicationPageSource(pc,requestedPage,Constants.APP_CFC,mode);
   
    _onRequest(pc, requestedPage, appPS,rl);
  }
View Full Code Here

Examples of railo.runtime.PageSource

       
    // search local
    if(searchLocal) {
      //Resource dir=pc.getCurrentTemplatePageSource().getResourceTranslated(pc).getParentResource();
      //dir=dir.getRealResource(path);
      PageSource ps= pci.getRelativePageSourceExisting(path);
      if(ps!=null){
        Mapping mapping = ps.getMapping();
        String _path=ps.getRealpath();
        _path=ListUtil.trim(_path,"\\/");
        String[] list = _listMapping(pc,mapping,_path);
        if(!ArrayUtil.isEmpty(list)) rtn=add(rtn,list);
      }
    }
View Full Code Here

Examples of railo.runtime.PageSource

    if(mode==ApplicationListener.MODE_ROOT)return getApplicationPageSourceRoot(pc, filename);
    return getApplicationPageSourceCurr2Root(pc, requestedPage, filename);
  }
 
  public static PageSource getApplicationPageSourceCurrent(PageSource requestedPage, String filename) {
    PageSource res=requestedPage.getRealPage(filename);
      if(res.exists()) return res;
    return null;
  }
View Full Code Here

Examples of railo.runtime.PageSource

      if(res.exists()) return res;
    return null;
  }
 
  public static PageSource getApplicationPageSourceRoot(PageContext pc, String filename) {
    PageSource ps = ((PageContextImpl)pc).getPageSourceExisting("/".concat(filename));
    if(ps!=null) return ps;
    return null;
  }
View Full Code Here

Examples of railo.runtime.PageSource

    if(ps!=null) return ps;
    return null;
  }
 
  public static PageSource getApplicationPageSourceCurr2Root(PageContext pc,PageSource requestedPage, String filename) {
    PageSource ps=requestedPage.getRealPage(filename);
      if(ps.exists()) {
      return ps;
    }
      Array arr=railo.runtime.type.util.ListUtil.listToArrayRemoveEmpty(requestedPage.getFullRealpath(),"/");
      //Config config = pc.getConfig();
    for(int i=arr.size()-1;i>0;i--) {
View Full Code Here

Examples of railo.runtime.PageSource

      return getApplicationPageSourceCurrent(requestedPage, isCFC);
    return getApplicationPageSourceRoot(pc, isCFC);
  }
 
  public static PageSource getApplicationPageSourceCurrent(PageSource requestedPage, RefBoolean isCFC) {
    PageSource res=requestedPage.getRealPage(Constants.APP_CFC);
      if(res.exists()) {
        isCFC.setValue(true);
        return res;
      }
      res=requestedPage.getRealPage(Constants.APP_CFM);
      if(res.exists()) return res;
    return null;
  }
View Full Code Here

Examples of railo.runtime.PageSource

      if(res.exists()) return res;
    return null;
  }
 
  public static PageSource getApplicationPageSourceRoot(PageContext pc, RefBoolean isCFC) {
    PageSource ps = ((PageContextImpl)pc).getPageSourceExisting("/"+Constants.APP_CFC);
    if(ps!=null) {
      isCFC.setValue(true);
        return ps;
    }
    ps = ((PageContextImpl)pc).getPageSourceExisting("/"+Constants.APP_CFM);
View Full Code Here

Examples of railo.runtime.PageSource

    return null;
  }
 

  public static PageSource getApplicationPageSourceCurr2Root(PageContext pc,PageSource requestedPage, RefBoolean isCFC) {
      PageSource res=requestedPage.getRealPage(Constants.APP_CFC);
      if(res.exists()) {
        isCFC.setValue(true);
        return res;
      }
      res=requestedPage.getRealPage(Constants.APP_CFM);
      if(res.exists()) return res;
     
      Array arr=railo.runtime.type.util.ListUtil.listToArrayRemoveEmpty(requestedPage.getFullRealpath(),"/");
    //Config config = pc.getConfig();
    String path;
    for(int i=arr.size()-1;i>0;i--) {
View Full Code Here

Examples of railo.runtime.PageSource

        sct.set(DO_STATUS_CODE, Caster.toBoolean(config.getErrorStatusCode()));
       
        // 500
        String template=config.getErrorTemplate(500);
        try {
            PageSource ps = ((PageContextImpl)pageContext).getPageSourceExisting(template);
            if(ps!=null) templates.set("500",ps.getDisplayPath());
            else templates.set("500","");
        } catch (PageException e) {
          templates.set("500","");
        }
        str.set("500",template);

        // 404
        template=config.getErrorTemplate(404);
        try {
            PageSource ps = ((PageContextImpl)pageContext).getPageSourceExisting(template);
            if(ps!=null) templates.set("404",ps.getDisplayPath());
            else templates.set("404","");
        } catch (PageException e) {
          templates.set("404","");
        }
        str.set("404",template);
View Full Code Here

Examples of railo.runtime.PageSource

    private void doGetComponent() throws PageException {
        Struct sct=new StructImpl();
        pageContext.setVariable(getString("admin",action,"returnVariable"),sct);
        // Base Component
        try {
            PageSource ps = ((PageContextImpl)pageContext).getPageSourceExisting(config.getBaseComponentTemplate());
            if(ps!=null) sct.set("baseComponentTemplate",ps.getDisplayPath());
            else sct.set("baseComponentTemplate","");
        } catch (PageException e) {
            sct.set("baseComponentTemplate","");
        }
        sct.set("strBaseComponentTemplate",config.getBaseComponentTemplate());
       
        // dump template
        try {
            PageSource ps = ((PageContextImpl)pageContext).getPageSourceExisting(config.getComponentDumpTemplate());
            if(ps!=null) sct.set("componentDumpTemplate",ps.getDisplayPath());
            else sct.set("componentDumpTemplate","");
        } catch (PageException e) {
            sct.set("componentDumpTemplate","");
        }
        sct.set("strComponentDumpTemplate",config.getComponentDumpTemplate());
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.