Package railo.runtime.dump

Examples of railo.runtime.dump.DumpRow


    //table.appendRow(1, new SimpleDumpData("cached"), new SimpleDumpData(isCached()?"Yes":"No"));

    DumpTable recs=new DumpTable("query","#cc99cc","#ffccff","#000000");
    recs.setTitle("Query");
    if(dp.getMetainfo())recs.setComment(comment.toString());
    recs.appendRow(new DumpRow(-1,heads));
   
    // body
    DumpData[] items;
    int recordcount=query.getRecordcount();
    int columncount=query.getColumnNames().length;
    for(int i=0;i<recordcount;i++) {
      items=new DumpData[columncount+1];
      items[0]=new SimpleDumpData(i+1);
      for(int y=0;y<keys.length;y++) {
        try {
          Object o=query.getAt(keys[y],i+1);
          if(o instanceof String)items[y+1]=new SimpleDumpData(o.toString());
                    else if(o instanceof Number) items[y+1]=new SimpleDumpData(Caster.toString(((Number)o)));
                    else if(o instanceof Boolean) items[y+1]=new SimpleDumpData(((Boolean)o).booleanValue());
                    else if(o instanceof Date) items[y+1]=new SimpleDumpData(Caster.toString(o));
                    else if(o instanceof Clob) items[y+1]=new SimpleDumpData(Caster.toString(o));               
          else items[y+1]=DumpUtil.toDumpData(o, pageContext,maxlevel,dp);
        } catch (PageException e) {
          items[y+1]=new SimpleDumpData("[empty]");
        }
      }
      recs.appendRow(new DumpRow(1,items));

      if ( i == top - 1 )
        break;
    }
    if(!dp.getMetainfo()) return recs;
View Full Code Here


    // arguments
    FunctionArgument[] args = udf.getFunctionArguments();
       
        DumpTable atts = closure?new DumpTable("udf","#ff00ff","#ffccff","#000000"):new DumpTable("udf","#cc66ff","#ffccff","#000000");
       
    atts.appendRow(new DumpRow(63,new DumpData[]{new SimpleDumpData("label"),new SimpleDumpData("name"),new SimpleDumpData("required"),new SimpleDumpData("type"),new SimpleDumpData("default"),new SimpleDumpData("hint")}));
    for(int i=0;i<args.length;i++) {
      FunctionArgument arg=args[i];
      DumpData def;
      try {
        Object oa=null;
                try {
                    oa = UDFUtil.getDefaultValue(pageContext, (UDFPlus)udf, i, null);//udf.getDefaultValue(pageContext,i,null);
                } catch (PageException e1) {
                }
                if(oa==null)oa="null";
        def=new SimpleDumpData(Caster.toString(oa));
      } catch (PageException e) {
        def=new SimpleDumpData("");
      }
      atts.appendRow(new DumpRow(0,new DumpData[]{
          new SimpleDumpData(arg.getDisplayName()),
          new SimpleDumpData(arg.getName().getString()),
          new SimpleDumpData(arg.isRequired()),
          new SimpleDumpData(arg.getTypeAsString()),
          def,
View Full Code Here

      sct.setEL(KeyConstants._ref, dt.getRef());
    }
   
   
    DumpRow[] drs = dt.getRows();
    DumpRow dr;
    Query qry=null;
    DumpData[] items;
    for(int r=0;r<drs.length;r++){
      dr=drs[r];
      items = dr.getItems();
      if(qry==null)qry=new QueryImpl(toColumns(items),drs.length,"data");
      for(int c=1;c<=items.length;c++){
        qry.setAtEL("data"+c, r+1, toCFML(items[c-1],object,hasReference));
      }
      qry.setAtEL("highlight", r+1, new Double(dr.getHighlightType()));
     
    }
    if(qry!=null)sct.setEL(KeyConstants._data, qry);
    return sct;
  }
View Full Code Here

TOP

Related Classes of railo.runtime.dump.DumpRow

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.