I want to Integrate SpagoBI server in Grails or Java applications. I have developed some report in SpagoBI server and it is working fine. The same reports I want to display in Grails or Java applications.
You can use the SpagoBI SDK to integrate it in your web application (especially Java). Take a look here: http://wiki.spagobi.org/xwiki/bin/view/spagobi_sdk/
The SpagoBI SDK download contains examples of using the JavaScript tag library and Java libraries for retrieving available reports, executing, and displaying the report
You can also see a code sample I posted previously at the link below. It uses JSP and the SpagoBI Java library to execute a specified report (by label) and return a PDF or XLS.
http://www.spagoworld.org/jforum/posts/list/3592.page
Related
I have a little question on how Vaadin and GWT works. When I develop my views using Vaadin or GWT I only write Java code. But when does my Java is generated into HTML and JS files ? During the compilation of my project or on runtime ?
I tryed to find this information on the Vaadin guide but I didn't found anything yet :(
edit:
Not really duplicate of Cannot run mvn vaadin:compile on Vaadin Maven project, I don't have a problem with the code or execution of my project but for myself, I just wanna know when does Vaadin or GWT generates its HTML and JS files ? During the Maven build itslef or on runtime, on demand only?
In vaadin you have to distinct two things:
Backend is written in Java and is run on a servlet engine like Tomcat, Glasfish,...
Frontend is written in Java, GWT or Javascript
For the backend the java compiler just creates the .class files from the .java source code
For the frontend, the java code is GWT based, and thus compiled into highly optimized javascript code, this happens in the "Compile/Build Widgetset" phase ob your build process
Frontend code can also be written in javascript, this is then passed as is to the browser, but with the addition of some logic to connect the JS components to it's serverside part.
The generated frontend javascript code is then also responsible to build the html content.
The Vaadin Architecture
In Netbeans 8: a new HTML5 project using AngularJS online template lets me runs the html files with the debugger attached to browser and I can set breakpoints inside Netbeans JavaScript files to debug. Which makes things ALOT easier.
But when I create a Java maven based web project with AngularJS dependencies I have to use the browser's code viewer to debug the Javascript code. Which is more time consuming.
How can I debug JavaScript files inside Netbeans instead of debugging in the browser for a Java maven based web project ?
You don't / can't directly. While it is possible to run a Java based Javascript interpreter you won't have access to any browser windows or DOM elements. Instead, you almost certainly want to use EmbeddedBrowser to launch and control Firefox, Safari and/or IE depending on which you wish to test with in Netbeans. Note that it's running an external process to do this, and I don't think you'll be able to access the browser developer tools from within the embedded environment (which is what I normally use when debugging Javascript).
I've written some basic widgets within a Java web app I've built using Maven. I've referred to the Dojo documentation here:
http://dojotoolkit.org/documentation/tutorials/1.9/recipes/custom_widget/
to create them. What I want to do now is deploy them separately and access them from my original web app, but I haven't found a complete example on how to do this. Ultimately, I'd like to pass data to the widgets from my web app. This is my first attempt at widget programming, and I picked Dojo to create my first examples. It's also my first time using Dojo, as I normally use jQuery for any front-end work I do.
I'm using:
Java 1.6 and Spring 3.2 to build the web app
Maven 3.1.4
Dojo 1.9.2
Any pointers and/or links to tutorials much appreciated!
You can deploy the Dojo widget code seperately as a web application/resource bundle. Then in your main web application you just have to define the path to the external web resource, I suggest reading following articles:
Advanced AMD Usage (especially the part "Configuring the loader")
Configuring Dojo with dojoConfig (especially the part "loader configuration")
You can configure your Dojo packages using:
var dojoConfig = {
packages: [
{ name: "myWidgets", location: "/MyDojoResources/myWidgets" }
]
};
Then, if you use the following code in your web application:
require(["myWidgets/aWidget"], function(aWidget) {
// Use "aWidget"
});
The Dojo AMD loader will then load the file from /MyDojoResources/myWidgets/aWidget.js. So if you deploy your widgets under the /MyDojoResources context, it will work fine.
I just created a new project with NetBeans using the database template to connect to a MySQL database. After searching a while I got a question and hope anyone can help me with that:
I want to create a dialog in my application to change the connection-informations to the MySQL Server. I realized that the template gets the infos out of the persistence.xml file when it compiles. But I cant find the point in the source code where he reads the xml file and gets the informations. Is there any way to hardcode the IP adress and the Database name and so on in the code?
Thanks for your help!
Don't use the Swing Application Framework.
Newer NetBeans IDEs will display this disclaimer if you create a JavaDesktopApplication project:
Note that JSR-296 (Swing Application Framework) is no longer developed and will not become part of the official Java Development Kit as was originally planned. You can still use the Swing Application Framework library as it is, but no further development is expected.
If you are looking for a Swing-based application framework, consider using the NetBeans Platform [platform.netbeans.org][1], which is a full-featured platform suitable for creating complex and scalable desktop applications. The Platform contains APIs that simplify the handling of windows, actions, files, and many other typical application elements.
As to your question regarding the persistance.xml file, that's read somewhere in the framework (probably in org.jdesktop.application.Application). It's not in any of the files in your project. All you can really do is change the values in the file.
I'm new to IBM Rational Application Developer. I'm running RAD 7.5.5 and want to use GWT as the front end for an application I'm writing. What I'm asking is basically if someone has had experience with this, and if so, explain in a few simple steps how it's done or maybe refer me to an example somewhere online where this is explained.
Deploying to WebSphere is no different then deploying to any other Application Server, or even a servlet container. You just need to compile your GWT app and package it in a WAR/EAR file. You deploy the application and have whatever HTML file you want the GWT app to appear in, include the nocache.js.
If you generate your app either using the command line script, through Eclipse, or with Maven, this HTML file will be generated for you. GWT is server agnostic, unless you want to use GWT-RPC, in which case you need a Java backend. You could run GWT on a plain Apache server if you wanted.