Tuesday Apr 08, 2008

See You at JavaOne 2008

This year, Brian Leonard, and I (diva #2) are putting on the Developing (J)Ruby on Rails Applications with the NetBeans™ IDE hands-on lab at JavaOne. If you haven't tried developing a web application using Ruby on Rails, this is a good opportunity to get your feet wet. For those of you who are familiar with Ruby but haven't tried it in the IDE, you will also find this lab helpful. In this lab, you build the classic Ruby web log, you access the FreeTTS Java API to speach-enable the application, and you deploy the application to the GlassFish application server.

Speaking of JavaOne, in last year's hands-on-lab, one of the exercises was to use Dynamic Faces to build a chat room application. This section has been turned into the Building an Ajax Chat Room with the Ajax Transaction Dynamic Faces Component tutorial which is available from the NetBeans Web Application Learning Trail.

About the picture. Right behind me is flowing lava. To be able to walk right up to 1200 degree Celsius lava flow was an awesome experience. Fortunately, because the lava contains a large amount of glass, the lava flows very slowly.

Monday May 14, 2007

Ajaxifying JavaServer Faces Components

For those of you who were not able to attend our JavaOne 2007 hands-on lab, the lab is now available online at http://developers.sun.com/learning/javaoneonline/j1labs.jsp?track=8&yr=2007.

The lab starts off showing how to use dynamic faces Ajax zones to easily enable plain old JavaServer Faces components to send Ajax requests, and, in turn, dynamically update other components with the Ajax response. You also use an Ajax Transaction to continually poll the server. When you have completed the exercise, you have a simple chat room, like the one shown above. In the instructor-led lab, we had the web app running on the demo machine so you could watch us chatting with the lab attendees. The lab file contains an older version of the dynamic faces component library. To get the more recent one, see Installing the Currency Trader Sample Application at the NetBeans Visual Web Application documentation page.

In the second part of the lab, Winston and the Andersons show how to build a JavaServer Faces component from scratch, and use dynamic faces internally to Ajaxify the component.

The final section shows how to leverage jMaki to create a JavaScript component from one of the popular frameworks into a JavaServer Faces component. You can learn more about jMaki at ajax.dev.java.net and about the componentized widgets at widgets.dev.java.jet.

Tuesday Nov 21, 2006

Using the JasperReports Framework in Visual Web Applications to Generate PDF and HTML Reports

We just posted the http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/reports.html tutorial to the Sun Java Studio Creator Tutorials web site. This tutorial works for the Visual Web Pack with the following changes.

  • Throughout
    • The source is in src/java instead of just src.
  • Creating a JasperReports Library
    • Step 3: the library type is "Class Libraries"
    • For the Sun Java System Application Server, you must also add the commons-beanutils, commons-collections, and commons-logging jars to the library.
  • Setting Up the JRXML Editing Environment
    • Step 2: Click Advanced Options, then expand Options > IDE Configuration > System > Object Types to get to XML Objects.
  • Creating the Project and Authorizing Access to the JasperReport Classes
    • Create a Visual Web Application and use the BluePrints structure.
    • You do not need to do steps 5 through 10 for the Sun Java System Application Server.
  • Creating the Database Query
    • Also clear the LASTEDUPDATED column from each table.
  • Setting Up the Report Resources
    • To add the second source directory for the JRXML files, switch to the Files window.
    • Right-click the project node, and select New > Folder.
    • Set the folder name to reports.
    • Set the parent folder to src (that is, the "src" directory inside the project) so that this node will be parallel to src/java.
    • Click Finish. Note that the directory is only visible on the files view.
    • Right-click the project name, and select Properties.
    • Click Add Folder, navigate to the src/reports node, and click Open.
    • Change the Label from the default (src/newfolder) to something meaningful, such as JasperReports Definitions and click OK.
    • Switch back to the Projects window, and you will see this new node, with a <default package> node underneath it.
    • Put the JRXML files under the <default package> node (that is, into directory src/reports).



« March 2015