Adding charts to existing SmatGWT project

544 Views Asked by At

I'm currently using SmartGWT LGPL edition. Now I'd like to add HTML5 charts to the project so I'm willing to buy few SmartGWT Pro licenses. I tried the 60 days trial version to build a proof of concept and I failed. I couldn't make even simplicity theme to work with the Pro version.

My question is what are the steps of adding Pro components at the minimum to make charts working? I mean precisely the changes to proj_name.gwt.xml, index.html and the server jars needed (if any).

BTW, I don't need all Pro server components, I'll continue using the GWT Rpc based legacy services we built over the time. Eventually I may need the Pro components responsible for pdf/excel export.

Thanks!!

1

There are 1 best solutions below

0
On

I HAVE TO FIRST MAKE CLEAR THAT IT IS NOT LEGAL TO USE YOUR LGPL LICENSE AS YOU ARE ABOUT TO READ AND I RECOMMEND YOU GO AHEAD TO BUY THE PRO LICENSE TO ACCESS THESE FUNCTIONALITIES IF YOU HAVEN'T DONE SO BUT SINCE

My question is what are the steps of adding Pro components at the minimum to >make charts working?

I have a working solution as below:

  1. unjar both jars for LGPL and PRO, to access; all module descriptors such as com\smartgwt\SmartGwt.gwt.xml, smartclient javascript files such as ISC_Core.js in com\smartclient\public\sc\modules and smartgwt java source files in com\smartgwt\client\widgets\
  2. copy Charts.gwt.xml,ChartsNoScript.gwt.xml,Drawing.gwt.xml and DrawingNoScript.gwt.xml from PRO and paste them in the equivalent path in LGPL, overwrite incase asked.
  3. copy ISC_Charts.js and ISC_ISC_Drawing.js from PRO to LGPL and jar back your LGPL distro
  4. Add ISC_Charts.js and ISC_ISC_Drawing.js scripts to your host html file as you do for ISC_Core.js;

  5. Ensure you inherit SmartGwtNoScript.gwt.xml in your module descriptor instead of SmartGwt.gwt.xml and you are ready to go

  6. Incase on running you encounter an exception like FacetChart is a part the Charts Module which comes with Pro Edition or better. Please see smartclient.com/product for details on licensing. go to that source file such as com\smartgwt\client\widgets\chart\FaceChart.java

 if ("LGPL".equals(SC.getLicenseType())) {
   throw new java.lang.IllegalStateException("FacetChart is a part the Charts Module which comes with Pro Edition or better. Please see smartclient.com/product for details on licensing.");
 } else if (SC.hasCharts() == false) {
   throw new java.lang.IllegalStateException("The Charts module must be loaded to use FacetChart.  See the LoadingOptionalModules overview in the \"docs\" package of JavaDoc for instructions.");
 }

remove those checks from the default constructor, jar back your distro and re-run.

I hope this solves the problem