Showing posts with label DWR2. Show all posts
Showing posts with label DWR2. Show all posts

2007-06-22

Velocity Engine

I've been working with Velocity in Portlets and DWR (version 2) and found that I had to write my own Velocity utils to allow the DWR and generic Portlets to share context. I know there are velocity portlet classes our there but they are usually for a specific system of portals. Personally, I'm trying to write velocity portlets that can load on Liferay, JBoss, or any other Portal system.

As I was searching around at the start of the project I found that there were no portlet classes for velocity based portlets that were written generically to plug into any portal system. I ended up writing a short Velocity utility class to glue the two contexts together.

2007-01-04

DWR POJO as a front controller for a WebService

In the past I would have written my own JavaScript using XmlHttpRequest and a servlet on the back end. This means I have to maintain a lot of code that has nothing to do with my specific project. I evaluated several Ajax frameworks and settled on DWR for my current project. But I have a problem.

I've been writing a DWR object to act as a front controller to a web service. As I wrote previously when using DWR you write a POJO. Register the POJO in dwr.xml and the annotations take care of the rest. But, what about request scope parameters? The request is gone by the time my POJO is called...

http://getahead.ltd.uk/dwr/server/javaapi

We use the WebContextFactory to pull out context data.