Package railo.runtime

Examples of railo.runtime.Component.call()


    CFCInfo info = data.cfcs.get(HibernateUtil.id(entityName));
    if(info!=null) {
      Component cfc = info.getCFC();
      if(unique){
        cfc=(Component)Duplicator.duplicate(cfc,false);
        if(cfc.contains(pc,CommonUtil.INIT))cfc.call(pc, "init",new Object[]{});
      }
      return cfc;
    }
    return null;
  }
View Full Code Here


    Component c= (Component) mc.getProperty(Constants.COMPONENT);
       
    RPCServer server = RPCServer.getInstance(pc.getId(),pc.getServletContext());
    TypeMapping tm = server.getEngine().getTypeMappingRegistry().getDefaultTypeMapping();
   
    return AxisCaster.toAxisType(tm,c.call(pc,method.getName(),toRailoType(pc,args)),null);
  }

  private Object[] toRailoType(PageContext pc,Object[] args) throws PageException {
    Object[] trgs=new Object[args.length];
    for(int i=0;i<trgs.length;i++) {
View Full Code Here

    Object udf = c.get(p,key,null);
    String rt="any";
    if(udf instanceof UDF) {
      rt=((UDF)udf).getReturnTypeAsString();
    }
    Object rv = c.call(p, key, args);
   
    try {
      RPCServer server = RPCServer.getInstance(p.getId(),p.getServletContext());
      TypeMapping tm = server.getEngine().getTypeMappingRegistry().getDefaultTypeMapping();
      rv=Caster.castTo(p, rt, rv, false);
View Full Code Here

    }
   
    Object rtn;
    // no arguments
    if(objArr.length==1) {
      rtn = cfc.call(pc, KeyConstants._init, EMPTY);
   
    // named arguments
    else if(objArr[0] instanceof FunctionValue) {
      Struct args=Caster.toFunctionValues(objArr,0,objArr.length-1);
      rtn = cfc.callWithNamedValues(pc, KeyConstants._init, args);
View Full Code Here

      for(int i=0;i<objArr.length-1;i++) {
        args[i]=objArr[i];
        if(args[i] instanceof FunctionValue)
          throw new ExpressionException("invalid argument defintion,when using named parameters to a function, every parameter must have a name.");
      }
      rtn = cfc.call(pc, KeyConstants._init, args);
    }
    if(rtn==null)return cfc;
    return rtn;
  }
View Full Code Here

                udf=(UDF) v;
                if(udf.getReturnType()==CFTypes.TYPE_VOID) continue;
                if(udf.getFunctionArguments().length>0) continue;
               
                try {
            v=c.call(ThreadLocalPageContext.get(), udf.getFunctionName(), ArrayUtil.OBJECT_EMPTY);
          } catch (PageException e) {
            continue;
          }
              }
        }
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.