简体   繁体   English

将图表添加到现有的 SmatGWT 项目

[英]Adding charts to existing SmatGWT project

I'm currently using SmartGWT LGPL edition.我目前使用的是 SmartGWT LGPL 版。 Now I'd like to add HTML5 charts to the project so I'm willing to buy few SmartGWT Pro licenses.现在我想将 HTML5 图表添加到项目中,因此我愿意购买少量 SmartGWT Pro 许可证。 I tried the 60 days trial version to build a proof of concept and I failed.我尝试了 60 天试用版来构建概念验证,但失败了。 I couldn't make even simplicity theme to work with the Pro version.我什至无法制作简单的主题来使用 Pro 版本。

My question is what are the steps of adding Pro components at the minimum to make charts working?我的问题是至少添加 Pro 组件以使图表工作的步骤是什么? I mean precisely the changes to proj_name.gwt.xml, index.html and the server jars needed (if any).我的意思是对 proj_name.gwt.xml、index.html 和所需的服务器 jar(如果有)的更改。

BTW, I don't need all Pro server components, I'll continue using the GWT Rpc based legacy services we built over the time.顺便说一句,我不需要所有 Pro 服务器组件,我将继续使用我们随着时间的推移构建的基于 GWT Rpc 的遗留服务。 Eventually I may need the Pro components responsible for pdf/excel export.最终我可能需要负责 pdf/excel 导出的 Pro 组件。

Thanks!!谢谢!!

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我必须首先明确,在您即将阅读时使用您的 LGPL 许可证是不合法的,我建议您继续购买专业版许可证以访问这些功能,如果您还没有这样做,但因为

My question is what are the steps of adding Pro components at the minimum to >make charts working?我的问题是至少添加 Pro 组件以>使图表工作的步骤是什么?

I have a working solution as below:我有一个工作解决方案如下:

  1. unjar both jars for LGPL and PRO, to access;为 LGPL 和 PRO 解压两个 jar 以进行访问; 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\\所有模块描述符例如com \\ SmartGWT的\\ SmartGwt.gwt.xml,SmartClient的JavaScript文件如ISC_Core.jsCOM \\的SmartClient \\公共\\ SC \\模块和SmartGWT的java的在COM \\ SmartGWT的\\客户\\窗口小部件的源文件\\
  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.从 PRO 复制Charts.gwt.xml、ChartsNoScript.gwt.xml、Drawing.gwt.xml 和 DrawingNoScript.gwt.xml并将它们粘贴到 LGPL 中的等效路径中,覆盖询问。
  3. copy ISC_Charts.js and ISC_ISC_Drawing.js from PRO to LGPL and jar back your LGPL distroISC_Charts.js 和 ISC_ISC_Drawing.js从 PRO 复制到 LGPL 并 jar 回您的 LGPL 发行版
  4. Add ISC_Charts.js and ISC_ISC_Drawing.js scripts to your host html file as you do for ISC_Core.js ;ISC_Charts.js 和 ISC_ISC_Drawing.js脚本添加到您的主机 html 文件中,就像您对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确保您在模块描述符中继承SmartGwtNoScript.gwt.xml而不是SmartGwt.gwt.xml并且您准备好了

  6. Incase on running you encounter an exception like FacetChart is a part the Charts Module which comes with Pro Edition or better.如果在运行时遇到异常,例如FacetChart 是 Pro Edition 或更高版本附带的 Charts Module 的一部分。 Please see smartclient.com/product for details on licensing.有关许可的详细信息,请访问 smartclient.com/product。 go to that source file such as com\\smartgwt\\client\\widgets\\chart\\FaceChart.java转到该源文件,例如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我希望这能解决问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM