Esempio n. 1
0
 Resource callResourceRTE(
     PageContext pc, Component cfc, String methodName, Object[] args, boolean allowNull) {
   pc = ThreadLocalPageContext.get(pc);
   try {
     Object res = call(pc, getCFC(pc, cfc), methodName, args);
     if (allowNull && res == null) return null;
     return new CFMLResource(this, Caster.toComponent(res));
   } catch (PageException pe) {
     pe.printStackTrace();
     throw new PageRuntimeException(pe);
   }
 }
Esempio n. 2
0
 Resource[] callResourceArrayRTE(PageContext pc, Component cfc, String methodName, Object[] args) {
   pc = ThreadLocalPageContext.get(pc);
   try {
     Array arr = Caster.toArray(call(pc, getCFC(pc, cfc), methodName, args));
     Iterator<Object> it = arr.valueIterator();
     CFMLResource[] resources = new CFMLResource[arr.size()];
     int index = 0;
     while (it.hasNext()) {
       resources[index++] = new CFMLResource(this, Caster.toComponent(it.next()));
     }
     return resources;
   } catch (PageException pe) {
     throw new PageRuntimeException(pe);
   }
 }