I am trying to extend BIRT for include a Report Item that is based on a javascript widget. I am not able to figure out how to include the js files used by a widget in the reportitemPresentation. I went through the 'RotatedText' example and tried to override the onRowSets method:
public Object onRowSets( IRowSet[] rowSets ) throws BirtException
{
StringBuffer str = new StringBuffer();
Str.append("<script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script>">);
.....
return str.toString();
This added the script in the body of HTML but did not execute. Please ignore the syntax errors as the script tag was correctly added in the HTML.
In addition, I also want to add the code to initialize the widget:
$("#jqxbutton").jqxButton({ width: '150', height: '25'});
How do I do the following:
1. Include the js files of a widget in the html head tag.
2. How to include the code to initialize the widget and set some properties for the widget. For eg. How can I add the code for $(document).ready(){ // initialize the widget, add some properties};
What classes do I have to extend, which method to override? Any examples would be helpful. What is the right way to include the widget?