Examples of toGrid()


Examples of org.haystack.HGridBuilder.toGrid()

        for (int i = 0; i < ops.length; ++i) {
            HOp op = ops[i];
            b.addRow(new HVal[] { HStr.make(op.name()), HStr.make(op.summary()), });
        }

        writeGrid(writer, b.toGrid());
    }
}

//////////////////////////////////////////////////////////////////////////
// FormatsOp
View Full Code Here

Examples of org.haystack.HGridBuilder.toGrid()

            HGridFormat format = formats[i];
            b.addRow(new HVal[] { HStr.make(format.mime), format.reader != null ? HMarker.VAL : null,
                    format.writer != null ? HMarker.VAL : null, });
        }

        writeGrid(writer, b.toGrid());
    }
}

//////////////////////////////////////////////////////////////////////////
// ReadOp
View Full Code Here

Examples of org.haystack.HGridBuilder.toGrid()

        b.addCol("val");
        b.addCol("who");

        for (int i = 0; i < 17; ++i)
            b.addRow(new HVal[] { HNum.make(i + 1), HStr.make("" + (i + 1)), array.val[i], HStr.make(array.who[i]), });
        return b.toGrid();
    }

    @Override
    protected void onPointWrite(HDict rec, int level, HVal val, String who, HNum dur) {
        System.out.println("onPointWrite: " + rec.dis() + "  " + val + " @ " + level + " [" + who + "]");
View Full Code Here

Examples of org.haystack.HGridBuilder.toGrid()

    public void testNoRows() {
        HGridBuilder b = new HGridBuilder();
        b.meta().add("dis", "Title");
        b.addCol("a").add("dis", "Alpha");
        b.addCol("b");
        HGrid g = b.toGrid();

        // meta
        verifyEq(g.meta().size(), 1);
        verifyEq(g.meta().get("dis"), HStr.make("Title"));
View Full Code Here

Examples of org.haystack.HGridBuilder.toGrid()

        b.addCol("area");
        b.addRow(new HVal[] { HRef.make("a"), HStr.make("Alpha"), HNum.make(1200) });
        b.addRow(new HVal[] { HRef.make("b"), HStr.make("Beta"), null });

        // meta
        HGrid g = b.toGrid();
        verifyEq(g.meta().size(), 0);

        // cols
        verifyEq(g.numCols(), 3);
        verifyCol(g, 0, "id");
View Full Code Here

Examples of org.haystack.HGridBuilder.toGrid()

    public HGrid[] evalAll(String[] exprs, boolean checked) {
        HGridBuilder b = new HGridBuilder();
        b.addCol("expr");
        for (int i = 0; i < exprs.length; ++i)
            b.addRow(new HVal[] { HStr.make(exprs[i]) });
        return evalAll(b.toGrid(), checked);
    }

    /**
     * Call "evalAll" operation to evaluate a batch of vendor specific
     * expressions on the server. See "eval" method for list of vendor
View Full Code Here

Examples of org.haystack.HGridBuilder.toGrid()

            b.addRow(new HVal[] { ids[i] });

        // make request
        HGrid res;
        try {
            HGrid req = b.toGrid();
            res = call("watchSub", req);
        }
        catch (CallErrException e) {
            // any server side error is considered close
            watchClose(w, false);
View Full Code Here

Examples of org.haystack.HGridBuilder.toGrid()

        b.addCol("id");
        for (int i = 0; i < ids.length; ++i)
            b.addRow(new HVal[] { ids[i] });

        // make request
        HGrid req = b.toGrid();
        call("watchUnsub", req);
    }

    HGrid watchPoll(HClientWatch w, boolean refresh) {
        if (w.id == null)
View Full Code Here

Examples of org.haystack.HGridBuilder.toGrid()

        if (refresh)
            b.meta().add("refresh");
        b.addCol("empty");

        // make request
        HGrid req = b.toGrid();
        try {
            return call("watchPoll", req);
        }
        catch (CallErrException e) {
            // any server side error is considered close
View Full Code Here

Examples of org.haystack.HGridBuilder.toGrid()

        if (send) {
            try {
                HGridBuilder b = new HGridBuilder();
                b.meta().add("watchId", w.id).add("close");
                b.addCol("id");
                call("watchUnsub", b.toGrid());
            }
            catch (Exception e) {
                // ignore
            }
        }
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.