Spring ROO and an Idea

 I have being playing around with Spring ROO. It is a project with great potential and the facility to integrate seamlessly with maven is an added advantage.

There are many tutorials on “An enterprise Java Application in 10 minutes with ROO”, this is not a tutorial but rather looks at enhancing ROO for use in projects The reader who is unfamiliar with Spring ROO is advised to look at .http://www.springsource.org/roo for an introduction to Spring ROO.

How one draw back that seems to plague Spring ROO is the lack of sorting and filtering functionality on the web frontend lists. In other words how do we sort tabular data? This question  is obviously an important one and vital to many web applications.

An answer that we could employ is displaytag a little known but help tag library that could assist us to sort and export tabular data to excel and csv files.

In the generated list.jspx we have:

 

If we had to use display tag instead we would have :

Now we could actually make changes to the code generation and the annotations to alter and create our default JSPs to use the display tag. However for this exercise we can assume that we did it by hand and produced the above.

The result when running the application with mvn tomcat:run we have in our browser( http://127.0.0.1:8080/truckmanagement/trucks?page=1&size=10 ):

We can even extend the above to use displaytags exporting abilities to export to excel:

Advertisements

About gjcbell

I am the Cloud Architect at IBM. I work in and create Hybrid Cloud solutions. These are solutions that have an on premise facet and multi Cloud platform facet. My area of focus spans the Bluemix Platform, IBM Cloud Private as well as cloud brokerage.
This entry was posted in Uncategorized. Bookmark the permalink.

4 Responses to Spring ROO and an Idea

  1. clandestino_bgd says:

    Hi,
    have you maybe had a chance to create a roo addon for displaytag?

    best,
    milan

    • gjcbell says:

      Hi Milan,

      No I have not had a chance to create a roo addon for dsiplaytag. Now that you have mentioned it I will consider it for a future post.

      thanks for the comment,

      Gabriel

  2. Julio says:

    Interesting post.
    A link to displaytag would be nice, an the title is bit vague.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s