Skip to main content



      Home
Home » Archived » BIRT » how to add javascript widgets in report(how to add javascript widgets in report)
how to add javascript widgets in report [message #1702185] Mon, 20 July 2015 10:02 Go to next message
Eclipse UserFriend
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?
Re: how to add javascript widgets in report [message #1704047 is a reply to message #1702185] Thu, 06 August 2015 17:01 Go to previous message
Eclipse UserFriend
Take a look at this blog post on using BIRT with External javascript libraries: http://blogs.actuate.com/using-external-javascript-libraries-with-birt-jquery-jvectormaps/
Previous Topic:NullPointerException in BIRT web Services
Next Topic:BIRT Report Fails (Just shows frame)
Goto Forum:
  


Current Time: Fri Jul 04 16:43:39 EDT 2025

Powered by FUDForum. Page generated in 0.24689 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top