In this post, I will continue with some of the great things that you can do with Pentaho and YUI.
Do you have the need to add new fields to a table without writing code? By leveraging the Pentaho metadata services, it is easy.
First of all, grab the files off google code.
-MQLAction.html - This file can really be placed anywhere under the webapps/pentaho directory, but I recommend right under the pentaho directory. The html file just loades the MQLAction.js.
-MQLAction.js - The MQLAction.js file will dynamically load all the needed components using YUI Loader. The loader will get yui and non-yui files. It is a fabulous tool as it also grabs the yui css files.
-TaskNode.js - Create by the YAHOO team, this subclasses the TextNode and allows the handy checkbox feature.
-MetadataTree.js - The tree is formed by calling the Pentaho servlet AdhocWebService. If you update the metadata.xmi file on the platform this tree dynamically updates. For the purposes of this demo, I have hard-coded the solution of steel-wheels and the model BV_ORDERS. That can be changed or in other solutions, I have a model drop-down list.
-MetadataTable.js - The table takes the selected nodes from the tree and calles the mqlAction.xaction to get the results in JSON format.
-mqlAction.xaction - Generic xaction that will run whatever bit of MQL that is passed to it. It can handle selections, conditions, and orders. the solution, model and distinct are also passed as parameters.
Next, go get the yui platform and ensure it is in webapps/pentaho/yui
If you are able to use these file or have anothe approach for dynamic reporting, let me know.
At this time, you cannot save the datatable, but there is always tomorrow.
The Sunday Blues Are All in Your Head
1 hour ago