Index: /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloSession.java
===================================================================
--- /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloSession.java	(revision 4239)
+++ /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloSession.java	(revision 4240)
@@ -1,4 +1,5 @@
 package eu.clarin.cmdi.vlo;
 
+import org.apache.wicket.Session;
 import org.apache.wicket.protocol.http.WebSession;
 import org.apache.wicket.request.Request;
@@ -68,3 +69,10 @@
         vloSessionPageParameters.mergeWith(parameters);
     }
+
+    /**
+     * @return the VLO session associated to current thread
+     */
+    public static VloSession get() {
+        return (VloSession) Session.get();
+    }
 }
Index: /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.java
===================================================================
--- /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.java	(revision 4239)
+++ /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.java	(revision 4240)
@@ -62,9 +62,9 @@
                 } else {
                     // different theme requested, compose it
-                    ((VloSession) Session.get()).setCurrentTheme(new Theme(object.toString()));
+                    VloSession.get().setCurrentTheme(new Theme(object.toString()));
                     // remember the theme as a vlo session page parameter
                     PageParameters params = new PageParameters();
                     params.add("theme", object);
-                    ((VloSession) Session.get()).addVloSessionPageParameters(params);
+                    VloSession.get().addVloSessionPageParameters(params);
                 }
             }
Index: /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/BasePage.java
===================================================================
--- /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/BasePage.java	(revision 4239)
+++ /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/BasePage.java	(revision 4240)
@@ -52,5 +52,5 @@
         
         Label pageTitle;
-        pageTitle = new Label ("pagetitle", ((VloSession)getSession()).getCurrentTheme().pageTitle);
+        pageTitle = new Label ("pagetitle", VloSession.get().getCurrentTheme().pageTitle);
         add (pageTitle);
         
@@ -58,5 +58,5 @@
         PageParameters startPageParameters = new PageParameters ();
         // add the session persistent parameters
-        startPageParameters.mergeWith(((VloSession)this.getSession()).getVloSessionPageParameters());
+        startPageParameters.mergeWith(VloSession.get().getVloSessionPageParameters());
 
         BookmarkablePageLink link = new BookmarkablePageLink("startpage",
@@ -66,5 +66,5 @@
         // refer to the the left part of the vlo banner as a resource
         ContextRelativeResource leftImageRes;
-        leftImageRes = new ContextRelativeResource(((VloSession)getSession()).getCurrentTheme().topLeftImage);
+        leftImageRes = new ContextRelativeResource(VloSession.get().getCurrentTheme().topLeftImage);
 
         // create the image
@@ -77,5 +77,5 @@
         // refer to the right part of the vlo banner as a resource
         ContextRelativeResource rightImageRes;
-        rightImageRes = new ContextRelativeResource(((VloSession)getSession()).getCurrentTheme().topRightImage);
+        rightImageRes = new ContextRelativeResource(VloSession.get().getCurrentTheme().topRightImage);
         
         // create the image
@@ -89,5 +89,5 @@
         
         Label partnerLinkMap;
-        partnerLinkMap = new Label ("partnerlinkmap", ((VloSession)getSession()).getCurrentTheme().partnerLinkMap);
+        partnerLinkMap = new Label ("partnerlinkmap", VloSession.get().getCurrentTheme().partnerLinkMap);
         partnerLinkMap.setEscapeModelStrings(false);
         add (partnerLinkMap);
@@ -102,5 +102,5 @@
      */
     public void renderHead(IHeaderResponse response) {
-        response.render(CssHeaderItem.forUrl(((VloSession) getSession()).getCurrentTheme().cssFile));
+        response.render(CssHeaderItem.forUrl(VloSession.get().getCurrentTheme().cssFile));
     }    
 }
Index: /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentLinkPanel.java
===================================================================
--- /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentLinkPanel.java	(revision 4239)
+++ /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/DocumentLinkPanel.java	(revision 4240)
@@ -2,5 +2,4 @@
 
 import eu.clarin.cmdi.vlo.FacetConstants;
-import eu.clarin.cmdi.vlo.VloSession;
 import org.apache.solr.common.SolrDocument;
 import org.apache.wicket.markup.html.basic.Label;
Index: /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanel.java
===================================================================
--- /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanel.java	(revision 4239)
+++ /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetBoxPanel.java	(revision 4240)
@@ -69,5 +69,5 @@
         facetParameters.add(ShowAllFacetValuesPage.SELECTED_FACET_PARAM, facetField.getName());
         facetParameters.add(ShowAllFacetValuesPage.FACET_MIN_OCCURS, "1");
-        facetParameters.mergeWith(((VloSession)VloSession.get()).getVloSessionPageParameters());
+        facetParameters.mergeWith(VloSession.get().getVloSessionPageParameters());
 
         add(new BookmarkablePageLink("showMore", ShowAllFacetValuesPage.class, facetParameters) {
Index: /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetLinkPanel.java
===================================================================
--- /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetLinkPanel.java	(revision 4239)
+++ /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetLinkPanel.java	(revision 4240)
@@ -20,5 +20,5 @@
         q.setFilterQuery(count);
         PageParameters param = q.getPageParameters();
-        param.mergeWith(((VloSession) VloSession.get()).getVloSessionPageParameters());
+        param.mergeWith(VloSession.get().getVloSessionPageParameters());
         
         Link<Count> facetLink = new BookmarkablePageLink("facetLink", FacetedSearchPage.class, param);
Index: /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.java
===================================================================
--- /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.java	(revision 4239)
+++ /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/FacetedSearchPage.java	(revision 4240)
@@ -167,5 +167,5 @@
             param = new PageParameters(query.getPageParameters());
             // add the session persistent parameters
-            param.mergeWith(((VloSession)this.getSession()).getVloSessionPageParameters());
+            param.mergeWith(VloSession.get().getVloSessionPageParameters());
 
             final RequestCycle reqCycle = getRequestCycle();
@@ -191,5 +191,5 @@
             PageParameters param = query.getPageParameters();
             // add the session persistent parameters
-            param.mergeWith(((VloSession)this.getSession()).getVloSessionPageParameters());
+            param.mergeWith(VloSession.get().getVloSessionPageParameters());
 
             setResponsePage(FacetedSearchPage.class, param);
Index: /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java
===================================================================
--- /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java	(revision 4239)
+++ /vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java	(revision 4240)
@@ -85,5 +85,5 @@
             PageParameters newParam = new PageParameters(query.getPageParameters());
             // add the session persistent parameters
-            newParam.mergeWith(((VloSession) this.getSession()).getVloSessionPageParameters());
+            newParam.mergeWith(VloSession.get().getVloSessionPageParameters());
 
             BookmarkablePageLink<String> backLink = new BookmarkablePageLink<String>("backLink", FacetedSearchPage.class, newParam);
@@ -428,5 +428,5 @@
         PageParameters newParam = new PageParameters(parameters);
         // add the session persistent paremeters
-        newParam.mergeWith(((VloSession) this.getSession()).getVloSessionPageParameters());
+        newParam.mergeWith(VloSession.get().getVloSessionPageParameters());
 
         final RequestCycle reqCycle = getRequestCycle();
@@ -463,5 +463,5 @@
                 Application.get().getRequestCycleSettings().getResponseRequestEncoding())); // get current character set from request cycle
         // add the session persistent parameters
-        newParam.mergeWith(((VloSession) VloSession.get()).getVloSessionPageParameters());
+        newParam.mergeWith(VloSession.get().getVloSessionPageParameters());
         BookmarkablePageLink<ShowResultPage> docLink = new BookmarkablePageLink<ShowResultPage>(linkId, ShowResultPage.class,
                 newParam);
