Portlets with Cool Jmaki widgets using PortletPlugin
As my previous post says portlet Plugin has made life much easier.Let me describe the steps to get cool jmaki widgets as portlets using portlet plugin in Netbeans.
- Create New Project
- Choose portlet Applications and then JSR168 portlet Application
- Then give your project name say "MyClock"
- By default the Names of PortletClass is set to HelloWorld.So you can give it what ever name you want.Let us say here i give it as MyClock.
- That's done you will get a ProtoType of your portlet.
- Just select WebPages in you will be able to see edit.jsp,help.jsp and view.jsp which are the JSP Pages you get to see when you click on different modes of portlets.
- Let us say we don't want Help view and Edit view .Just go the WebPages/WEB_INF and click on portlet.xml
- In portlet.xml you can see <portlet-mode> tags.Remove the HELP and EDIT mode tags from there.
- Go to the view.jsp.Remove the "HelloWorld" string that you will find there.
- Click on the palette that you can see on your right hand side.
- You will have all the options of jmaki.Just drag and drop the DojoClock into view.jsp(If you don't go to Tools->updateCenter and add Ajax Jmaki FrameWork)
- Important point that you need to do is add the Jmaki framework to you project.For that you should go the properties of you project.Click on Frameworks and Add the Jmaki Framework.
Now it is all done.you can build your project and the portlet war file is ready to be deployed in any portal server.
You will be more happy if you are using SunPortalServer or OpenSourcePortlet Container as deploying to them is also just a click away using this Portlet Plugin.
Cool Guys MyClock portlet is running .That's all it takes to use PortletPlugin to create cool jmaki portlets.Njoy Exploring!!!!! you can make of cool widgets like sudhoku ,chat etc...

I'm trying to do a sample portlet using your information but I am getting an error the way jMaki is trying to load the resources, since it is not able to load the jmaki.js stuff.
It's trying to load from Hi,
I am trying to create a simple portlet that displays a jMaki widget from a DOJO Clock.
It doesn't work because of the way that the jsps handles the resources, It's trying to load the resources from:
jmaki.webRoot='http://localhost:9090/';
Since this is not setup correctly it is not finding any js files. any help or pointer on this?
thanks!
Posted by Yago Díaz on April 07, 2008 at 03:21 AM PDT #
Hi Yago,
In my application i had the jmaki.js and all the jmaki related files in my application itself.If you can mail me your war file i can may be look and find out the problem.
-Murali
Posted by Murali on April 16, 2008 at 05:05 AM PDT #