Hi Jon,
Thanks for the link.
This is what I have/had on my page:
visitsWebPart = new LABKEY.QueryWebPart({
schemaName : 'offsite_repository',
queryName: 'patient_visit'
renderTo: renderElement,
showRecordSelectors: true,
frame: 'none',
buttonBar: {//add custom buttons
}
});
Looking at your page you linked to, I see the Files browser needs some extra libraries loaded. Do I need to do that to access the QueryWebPart now?
..
Ok, looking deeper into the page you linked, I found the following:
${labkey.webPart(partName='Query', showFrame='true', title = 'Module Inventory', schemaName ='core', queryName ='Modules', buttonBarPosition ='top', allowChooseQuery ='true', allowChooseView = 'true')}
Is there a way I can still use LABKEY.QueryWebPart (in JavaScript) rather that the above syntax?
I integrate custom buttons like so, in the existing code:
buttonBar: {
includeStandardButtons: false,
items: [
{
text: 'Row Actions',
requiresSelection: true,
items: customButtons
},
LABKEY.QueryWebPart.standardButtons.views,
LABKEY.QueryWebPart.standardButtons.exportRows,
LABKEY.QueryWebPart.standardButtons.print,
LABKEY.QueryWebPart.standardButtons.pageSize
]
}
Cheers,
Trent |
Ok.. after getting it working with the syntax:
${labkey.webPart(partName='Query', showFrame='true', title = 'Module Inventory', schemaName ='core', queryName ='Modules', buttonBarPosition ='top', allowChooseQuery ='true', allowChooseView = 'true')}
and searching `QueryWebPart` in the developer console, i find that ext3.min.js is loaded. I find this works:
<script type="text/javascript">
LABKEY.requiresExt3ClientAPI(function(){
Ext4.onReady(function(){
var vialsWebPart = new LABKEY.QueryWebPart({
schemaName : 'offsite_repository',
queryName: 'patient_visit',
renderTo: 'qwpReg',
showRecordSelectors: true,
frame: 'none'});
console.log(LABKEY.QueryWebPart);
});
});
</script>
<div id="qwpReg"></div>
Not sure if there is a better approach.... |