Package railo.runtime

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


        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

      //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

  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

       
        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

    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

  *  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

  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

      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

        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

TOP

Related Classes of railo.runtime.PageSource

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.