LABKEY.QueryWebPart and config.metadata

LabKey Support Forum (Inactive)
LABKEY.QueryWebPart and config.metadata Lloyd  2012-03-05 14:38
Status: Closed
 
Josh,

I believe that I did what you said, used the first style and removed the [] so that it was not part of an array. I also used a known good xml and copied it into the xml string, but got this response: Module-based queries are read-only!

    var xml = '<tables xmlns="http://labkey.org/data/xml">...</tables>';
    var reportGrid = new LABKEY.QueryWebPart({
                renderTo: 'report',
                frame: 'none',
                containerPath: '/xxxx/module', // fill this in with the actual container path
                schemaName: 'schema',
                queryName: 'myQuery',
                metadata:
                           {type: 'xml', value: xml} // using xml specified as a variable
                           //{type: 'xml', value: 'test.query.xml'} // using queries/schema/test.query.xml
                           //{type: 'xml', value: 'test'} // using queries/schema/test.query.xml
                           
                ,
                buttonBarPosition: 'top',
                allowChooseQuery: false,
                allowChooseView: false
    });

Lloyd