Archive for the 'pandora' Category

PANDORA on SourceForge

November 12, 2006

The PANDORA framework is now officially Open Source (LGPL license) and I created a sourceforge project for it. They even gave us a webspace, so the official URL for PANDORA is: 

Cool, isn’t it? I also installed a wiki (DokuWiki)  and created a little tutorial there. A complete documentation is about to follow. I had to install the wiki on because DokuWiki stores it’s content in plain files but sourceforge’s webspace is read-only for security reasons, so the wiki doesn’t work there.


Multi-Language Support with Filters

October 22, 2006

The multi-language support has now been moved from the PANDORA-core to a filter (PolyglotFilter) so it may be used or not, depending of the needs.

The filter works in 2 ways:

On the way in (Request) it finds the desired language from either extracting it from the URL or by matching the accepted Locales (as sent from the browser) and the supported languages (as specified in the filter-entry in web.xml).

The filter adds a ResponseWrapper that extends the functionality of the Response#encodeURL() method. Here we encode the locale to use into the URL, so it will look something like that:;locale=en?some=params

The next time the filter gets the locale from that code in the URL.

This explicit method has 2 advantages over storing the language in a session variable:

  1. Any URL can be bookmarked and keeps the desired language
  2. We have no problems with session timeouts

There is one drawback though — we have to encode all URLs in our application. But there is a nice macro in the pandora_global_library.vm: #href() so encoding is as easy as that:

<a #href(“../controller/”)>


August 31, 2006

This Blog is dedicated to PANDORA, a Lightweight Web Application Framework written in Java, and HEUREKA, a Backoffice and CMS system based on the PANDORA-Framework.