Examples of PageSource


Examples of railo.runtime.PageSource

       
        return getRealResource(pc,destination,res);
    }

    private static Resource getRealResource(PageContext pc, String destination, Resource defaultValue) {
      PageSource ps = pc.getCurrentPageSource();
      if(ps!=null) {
        ps=ps.getRealPage(destination);
       
        if(ps!=null){
          Resource res = ps.getResource();
          if(res!=null)return getCanonicalResourceEL(res);
        }
       
      }
      return defaultValue;
View Full Code Here

Examples of railo.runtime.PageSource

    private static boolean parentExists(Resource res) {
        res=res.getParentResource();
        return res!=null && res.exists();
    }
    private static boolean parentExists(PageSource ps) {
      PageSource p = ((PageSourceImpl)ps).getParent();
      return p!=null && p.exists();
    }
View Full Code Here

Examples of railo.runtime.PageSource

  *  The relative path to the custom error page.
  * @param template value to set
  * @throws MissingIncludeException
  **/
  public void setTemplate(String template) throws MissingIncludeException  {
      PageSource sf=pageContext.getCurrentPageSource().getRealPage(template);
      //new PageSource(pageContext.getCurrentTemplateSourceFile(),template);
    if(!sf.exists())
      throw new MissingIncludeException(sf);
    errorPage.setTemplate(sf);
  }
View Full Code Here

Examples of railo.runtime.PageSource

  public Range registerString(BytecodeContext bc, String str) throws IOException {
    boolean append=true;
   
    if(staticTextLocation==null) {
      PageSource ps = bc.getPageSource();
      Mapping m = ps.getMapping();
      staticTextLocation=m.getClassRootDirectory();
     
      staticTextLocation.mkdirs();
      staticTextLocation=staticTextLocation.getRealResource(ps.getJavaName()+".txt");
      if(staticTextLocation.exists()) append=false;
      else staticTextLocation.createFile(true);
     
      off=0;
    }
View Full Code Here

Examples of railo.runtime.PageSource

      ConfigWebImpl c=(ConfigWebImpl) pageContext.getConfig();
      if(m==c.getTagMapping()) m=c.getServerTagMapping();
      else m=null;
      // is te page source from a tag mapping, so perhaps it was moved from server to web context
      if(m!=null){
        PageSource ps = m.getPageSource(source.getFilename());
        try {
          cfc = ComponentLoader.loadComponent(pageContext,null,ps, source.getFilename().substring(0,source.getFilename().length()-(pageContext.getConfig().getCFCExtension().length()+1)), false,true);
        }
        catch (PageException e1) {
          throw e;
View Full Code Here

Examples of railo.runtime.PageSource

        if(!StringUtil.endsWith(realPathes[i],'/'))realPathes[i]=realPathes[i]+"/";
      }
     
      // MUSTMUST use cache like regular ct
    // page source
      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()));
View Full Code Here

Examples of railo.runtime.PageSource

import railo.runtime.type.util.ListUtil;

public class PageContextUtil {

  public static ApplicationListener getApplicationListener(PageContext pc) {
    PageSource ps = pc.getBasePageSource();
    if(ps!=null) {
      MappingImpl mapp=(MappingImpl) ps.getMapping();
      if(mapp!=null) return mapp.getApplicationListener();
    }
    return pc.getConfig().getApplicationListener();
  }
View Full Code Here

Examples of railo.runtime.PageSource

  @Override
  public void onRequest(PageContext pc, PageSource requestedPage, RequestListener rl) throws PageException {
    RefBoolean isCFC=new RefBooleanImpl(false);
   
    PageSource appPS=//pc.isCFCRequest()?null:
      AppListenerUtil.getApplicationPageSource(pc, requestedPage, mode, isCFC);
   
    if(isCFC.toBooleanValue())_onRequest(pc, requestedPage,appPS,rl);
    else ClassicAppListener._onRequest(pc, requestedPage,appPS,rl);
  }
View Full Code Here

Examples of railo.runtime.PageSource

  private int mode=MODE_CURRENT2ROOT;

  @Override
  public void onRequest(PageContext pc,PageSource requestedPage, RequestListener rl) throws PageException {
   
    PageSource application=//pc.isCFCRequest()?null:
      AppListenerUtil.getApplicationPageSource(pc,requestedPage,Constants.APP_CFM,mode);
   
    _onRequest(pc, requestedPage, application,rl);
  }
View Full Code Here

Examples of railo.runtime.PageSource

      if(rethrow)throw mie;
    }
   
    // on Request End
    if(application!=null){
      PageSource onReqEnd = application.getRealPage("OnRequestEnd.cfm");
          if(onReqEnd.exists())pc.doInclude(new PageSource[]{onReqEnd},false);
    }
  }
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.