|
|
|||||
Ludovic Champenois's BlogJanuary 2007 ArchivesJava EE 5 APIs now in a Maven repository...Posted by ludo on January 16, 2007 at 08:58 PM | Permalink | Comments (13)Bonjour, comment Java? Finally, the Java EE 5 API jar has been published via a Maven repository: Check https://maven-repository.dev.java.net/nonav/repository/javaee/ So if you get this api jar file, you can compile the following class: import javax.jms.Queue;In a Maven project defined by this pom file: (notice the scope value which is 'provided') ?xml version="1.0" encoding="UTF-8"?>You can compile you code with this jar, but of course you cannnot run your application with it since it contains only the Java EE 5 APIs and does not contain any method bodies. If you try to run, you would get this exception: Exception in thread "main" java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/mail/Session In order to execute a Java EE 5 application, you'll still need a Java EE 5 container, like for example the GlassFish application server. Ludo Extending the jMaki Ajax framework with new components...Posted by ludo on January 16, 2007 at 09:20 AM | Permalink | Comments (2)Bonjour, comment Java? What is the value of an Ajax components library if it cannot be extended either by you as a developer or external providers? Well, so far the jMaki framework was bundling an impressive collection of various components (dojo, Yahoo, Google, Scriptaculous, Spry, DHTML, Flickr, jMaki own components), and now you can install Add ons component libraries like the new jMaki Charting library which is based on the dojo charting APIs. A jMaki component library is a simple ZIP file that has the following requirements:
That's it. So now, let's examine how you can add a set of jMaki components into your development environment. Start with downloading the jMaki charting library from https://jmaki-charting.dev.java.net/servlets/ProjectDocumentList: Select the jMaki Charting Widget v.4.1 zip file and store it locally on your disk: ![]() Then, assuming you have the jMaki NetBeans plugin installed, you can use the Tools->Palette Manager->Add jMaki Component Library menu item and navigate to the location of the library zip file you just downloaded: ![]() If the selected ZIP file is the correct one, you should now see a new Palette entry called "jMaki Charting", that contains 3 new components called Area, Bar Chart and Line Chart, as seen below:
Now, if you drag and drop the Line Chart component on a JSP file or a Phobos EJS view file, you should get this when running your application: ![]() This is for example the fragment of code for a Phobos EJS view file: <% library.jmaki.insert( { component : "jmaki.charting.area" args : { xAxis : { title : 'Months', labels : ['January', 'February', 'March', 'April', 'May', 'June','July', 'August', 'September', 'October', 'November', 'December'] }, yAxis : { title : 'Temperature', tickCount : 3 }} value : {data : [ {color: 'red', values : [10, 25, 25, 5, 35, 5, 15, 5, 10, 15, 25, 30] }, {color: 'blue', values : [15, 35, 15, 40, 40, 15, 20, 10, 15, 20, 30, 35 ] }, {color: 'pink', values : [20, 40, 30, 35, 45, 20, 25, 15, 20, 25, 30, 40] }, {color: 'gray', values : [25, 45, 25, 45, 50, 25, 35, 25, 25, 20, 35, 45] } ] } ); %/> As you can see, the args and value objects are really JSON objects and can therefore be calculated via Phobos JavaScript controller on the server side... Following this jMaki Charting component library example, I hope you'll find some new ways to extend your jMaki Ajax environment. If you do, please share the new components with the community. Ludo Oh my gosh, I've been tagged...Posted by ludo on January 05, 2007 at 09:40 AM | Permalink | Comments (1)Bonjour, comment Java? I've been tagged by Brian... Before we tag the last blogging person on the planet, let me quickly tag a few of my friends (Greg Murray, Carla Mott, Jennifer Ball, Vince Kraemer, Inderjeet Singh ). A few things about me:
Ludo | |||||
|
|