Package railo.runtime

Examples of railo.runtime.Page


    } catch (PageException e1) {}
   
    try {
      String path = debugEntry.getPath();
      PageSource[] arr = ((PageContextImpl)pc).getPageSources(path);
      Page p = PageSourceImpl.loadPage(pc, arr,null);
     
      // patch for old path
      String fullname = debugEntry.getFullname();
      if(p==null) {
        if(path!=null) {
          boolean changed=false;
          if(path.endsWith("/Modern.cfc") || path.endsWith("\\Modern.cfc")) {
            path="/railo-server-context/admin/debug/Modern.cfc";
            fullname="railo-server-context.admin.debug.Modern";
            changed=true;
          }
          else if(path.endsWith("/Classic.cfc") || path.endsWith("\\Classic.cfc")) {
            path="/railo-server-context/admin/debug/Classic.cfc";
            fullname="railo-server-context.admin.debug.Classic";
            changed=true;
          }
          else if(path.endsWith("/Comment.cfc") || path.endsWith("\\Comment.cfc")) {
            path="/railo-server-context/admin/debug/Comment.cfc";
            fullname="railo-server-context.admin.debug.Comment";
            changed=true;
          }
          if(changed)pc.write("<span style='color:red'>Please update your debug template defintions in the railo admin by going into the detail view and hit the \"update\" button.</span>");
         
        }
       
        arr = ((PageContextImpl)pc).getPageSources(path);
        p = PageSourceImpl.loadPage(pc, arr);
      }
     
     
      pc.addPageSource(p.getPageSource(), true);
      try{
        Component cfc = pc.loadComponent(fullname);
        cfc.callWithNamedValues(pc, "output", args);
      }
      finally {
View Full Code Here


    }
    return HashUtil.create64BitHashAsString(sb, Character.MAX_RADIX);
  }

  public static Object getDefaultValue(PageContext pc, PageSource ps, int udfIndex, int index, Object defaultValue) throws PageException {
    Page p=ComponentUtil.getPage(pc,ps);
      if(p instanceof PagePlus) return ((PagePlus)p).udfDefaultValue(pc,udfIndex,index,defaultValue);
      Object rtn = p.udfDefaultValue(pc,udfIndex,index);
      if(rtn==null) return defaultValue;// in that case it can make no diff between null and not existing, but this only happens with data from old ra files
      return rtn;
  }
View Full Code Here

      return rtn;
  }
 

  public static Object getDefaultValue(PageContext pc, UDFPlus udf, int index, Object defaultValue) throws PageException {
    Page p=ComponentUtil.getPage(pc,udf.getPageSource());
    if(p instanceof PagePlus) return ((PagePlus)p).udfDefaultValue(pc,udf.getIndex(),index,defaultValue);
    Object rtn = p.udfDefaultValue(pc,udf.getIndex(),index);
      if(rtn==null) return defaultValue;// in that case it can make no diff between null and not existing, but this only happens with data from old ra files
      return rtn;
  }
View Full Code Here

      UDF udf=config.getFromFunctionCache(key);
    if(udf!=null) return udf;
   
    Mapping mapping=isweb?config.getFunctionMapping():config.getServerFunctionMapping();
      PageSourceImpl ps = (PageSourceImpl) mapping.getPageSource(filename);
      Page p = ps.loadPage(pc)
   
     
      // execute page
      Variables old = pc.variablesScope();
      pc.setVariablesScope(VAR);
      boolean wasSilent = pc.setSilent();
      try {
      p.call(pc);
      Object o= pc.variablesScope().get(name,null);
      if(o instanceof UDF) {
        udf= (UDF) o;
        config.putToFunctionCache(key, udf);
        return udf;
View Full Code Here

      PageContext pc = ThreadLocalPageContext.get();
      ConfigWeb config = pc.getConfig();
     
        String name="/"+aso.getType().replace('.', '/')+".cfc";

        Page p = PageSourceImpl.loadPage(pc, ((PageContextImpl)pc).getPageSources(name), null) ;

        if(p==null)throw new ApplicationException("Could not find a Component with name ["+aso.getType()+"]");
       
        Component cfc = ComponentLoader.loadComponent(pc, p, p.getPageSource(), aso.getType(), false);
        ComponentWrap cw=ComponentWrap.toComponentWrap(config.getComponentDataMemberDefaultAccess(),cfc);
       
        Iterator it = aso.entrySet().iterator();
        Map.Entry entry;
        while(it.hasNext()){
View Full Code Here

TOP

Related Classes of railo.runtime.Page

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.