Quick start

RedQueryBuilder has a large range of configuration options but only requires a few steps to get up and running.

Link to the JavaScript and CSS files

Copy the "RedQueryBuilder" directory to your project and add the following to your HTML page:


    <script src="RedQueryBuilder/RedQueryBuilder.nocache.js" type="text/javascript">//</script>
    <link href="RedQueryBuilder/gwt/dark/dark.css" rel="stylesheet" type="text/css" />
    <script src="RedQueryBuilder/RedQueryBuilderFactory.nocache.js" type="text/javascript">//</script>

Startup RedQueryBuilder

To check that everything is working properly provide the default location for the widget to appear by inserting this bit of HTML:


<div id="rqb">&nbsp;</div>

Then execute this JavaScript:


RedQueryBuilderFactory.create({
    meta : {
        tables : [ {
            "name" : "PERSON",
            "columns" : [ {
                "name" : "NAME",
                "label" : "Name",
                "type" : "STRING",
                "size" : 10
            }],
            fks : []
        } ],
        types : [ {
            "name" : "STRING",
            "editor" : "TEXT",
            "operators" : [ {
                "name" : "=",
                "label" : "is",
                "cardinality" : "ONE"
            }]
        }]
    }
});

Next steps

The JavaScript API documentation describes how to provide more meta data and how to get the widget to call your code when changes happen.