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 4199)
+++ vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/pages/ShowResultPage.java	(revision 4208)
@@ -4,4 +4,5 @@
 import eu.clarin.cmdi.vlo.Resources;
 import eu.clarin.cmdi.vlo.StringUtils;
+import eu.clarin.cmdi.vlo.VloPageParameters;
 import eu.clarin.cmdi.vlo.VloWebApplication;
 import eu.clarin.cmdi.vlo.VloSession;
@@ -32,4 +33,5 @@
 import org.apache.wicket.RequestCycle;
 import org.apache.wicket.behavior.AbstractBehavior;
+import org.apache.wicket.behavior.Behavior;
 import org.apache.wicket.extensions.ajax.markup.html.AjaxLazyLoadPanel;
 import org.apache.wicket.extensions.markup.html.basic.SmartLinkMultiLineLabel;
@@ -74,17 +76,13 @@
         
         super(currentParam);
-        final String docId = WicketURLDecoder.QUERY_INSTANCE.decode(getPageParameters().getString(PARAM_DOC_ID, null));
+        final String docId;
+        docId = WicketURLDecoder.QUERY_INSTANCE.decode(getPageParameters().get(PARAM_DOC_ID).toString());
         SolrDocument solrDocument = DaoLocator.getSearchResultsDao().getSolrDocument(docId);
         if (solrDocument != null) {
             final SearchPageQuery query = new SearchPageQuery(currentParam);
             
-            // now the persistent parameters are not in the query parameters
-            PageParameters newParam = new PageParameters ();
-            // add the new query parameters to this map
-            newParam.putAll(query.getPageParameters());
-            // add the persistent parameters to this map
-            //newParam = webApp.reflectPersistentParameters(newParam);
-            
-            newParam = ((VloWebApplication.ThemedSession)getSession()).reflectPersistentParameters(newParam);
+            // create parameters from the query, and merge them with session related parameters
+            VloPageParameters newParam; 
+            newParam = new VloPageParameters (query.getPageParameters());
             
             BookmarkablePageLink<String> backLink = new BookmarkablePageLink<String>("backLink", FacetedSearchPage.class, newParam);
@@ -180,11 +178,12 @@
      * Create one column for the attributes and one column for their values.
      * 
-     * @param
+     * @newParam
      */
-    private IColumn[] createAttributesColumns() {
-        IColumn[] columns = new IColumn[2];
+    private List<IColumn> createAttributesColumns() {
+        List<IColumn> columns = null;
 
         // create the column for the attribute names
-        columns[0] = new PropertyColumn<Object>(new ResourceModel(Resources.FIELD), "field") {
+        IColumn column = null;
+        column = new PropertyColumn<Object,Object>(new ResourceModel(Resources.FIELD), "field") {
 
             @Override
@@ -193,7 +192,8 @@
             }
         };
+        columns.add (column);
 
         // create the column for the values of the attributes
-        columns[1] = new AbstractColumn<DocumentAttribute>(new ResourceModel(Resources.VALUE)) {
+        column = new AbstractColumn<DocumentAttribute, String>(new ResourceModel(Resources.VALUE)) {
             @Override
             public void populateItem(Item<ICellPopulator<DocumentAttribute>> cellItem,
@@ -214,5 +214,5 @@
                     cellItem.add(new SmartLinkMultiLineLabel(componentId, attribute.getValue()) {
                         @Override
-                        protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
+                        public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
                             setEscapeModelStrings(false);
                             CharSequence body = getDefaultModelObjectAsString();
@@ -223,5 +223,5 @@
                     cellItem.add(new SmartLinkMultiLineLabel(componentId, attribute.getValue()) {
                         @Override
-                        protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
+                        public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
                             setEscapeModelStrings(false);
                             CharSequence body = getDefaultModelObjectAsString();
@@ -232,5 +232,5 @@
                     cellItem.add(new SmartLinkMultiLineLabel(componentId, attribute.getValue()) {
                         @Override
-                        protected void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
+                        public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag) {
                             CharSequence body = StringUtils.toMultiLineHtml(getDefaultModelObjectAsString());
                             replaceComponentTagBody(markupStream, openTag, getSmartLink(body));
@@ -245,4 +245,5 @@
             }
         };
+        columns.add (column);
 
         return columns;
@@ -252,5 +253,5 @@
      * Add landing page links to the result page.
      *
-     * @param solrDocument the document to get the links from
+     * @newParam solrDocument the document to get the links from
      */
     private void addLandingPageLinks(SolrDocument solrDocument) {
@@ -322,5 +323,5 @@
      * Add search page links to the result page.
      *
-     * @param solrDocument the document to get the links from
+     * @newParam solrDocument the document to get the links from
      */
     private void addSearchPageLinks(SolrDocument solrDocument) {
@@ -393,5 +394,5 @@
      * page.
      *
-     * @param solrDocument the document to get the links from
+     * @newParam solrDocument the document to get the links from
      */
     private void addResourceLinks(SolrDocument solrDocument) {
@@ -423,5 +424,9 @@
     
     private void addFeedbackLink(final PageParameters parameters) {
-        String thisURL = RequestUtils.toAbsolutePath(RequestCycle.get().urlFor(ShowResultPage.class, parameters).toString());
+        
+        // create VloPageParameters in orde to be able to convert to old style parameters
+        VloPageParameters newParam = new VloPageParameters (parameters);
+        
+        String thisURL = RequestUtils.toAbsolutePath(RequestCycle.get().urlFor(ShowResultPage.class, newParam.convert()).toString(),null);
         try {
             thisURL = URLEncoder.encode(thisURL,"UTF-8");
@@ -442,14 +447,13 @@
     }
 
-    public static BookmarkablePageLink<ShowResultPage> createBookMarkableLink(String linkId, SearchPageQuery query, String docId, VloSession session) {
-        PageParameters pageParameters = query.getPageParameters();
-        pageParameters.put(ShowResultPage.PARAM_DOC_ID, WicketURLEncoder.QUERY_INSTANCE.encode(docId));
-        
-        // webApp.reflectPersistentParameters(pageParameters);
-        // instead of this: pass page parameters back to the session
-        session.reflectPersistentParameters(pageParameters);
+    public static BookmarkablePageLink<ShowResultPage> createBookMarkableLink(String linkId, SearchPageQuery query, String docId) {
+
+        // create new page parameters from the query parameters and the session related ones
+        VloPageParameters newParam;
+        newParam = new VloPageParameters(query.getPageParameters());
+        newParam.add(ShowResultPage.PARAM_DOC_ID, WicketURLEncoder.QUERY_INSTANCE.encode(docId));
 
         BookmarkablePageLink<ShowResultPage> docLink = new BookmarkablePageLink<ShowResultPage>(linkId, ShowResultPage.class,
-                pageParameters);
+                newParam);
         return docLink;
     }
@@ -457,5 +461,5 @@
 	/**
 	 * Add contentSearch form (FCS)
-	 * @param solrDocument
+	 * @newParam solrDocument
 	 */
 	private void addSearchServiceForm(final SolrDocument solrDocument) {
@@ -483,5 +487,5 @@
 	/**
 	 * Add complete CMDI view
-	 * @param solrDocument
+	 * @newParam solrDocument
 	 */
 	private void addCompleteCmdiView(final SolrDocument solrDocument) {
@@ -515,10 +519,9 @@
 		
 		// remove complete CMDI view on page load
-		add(new AbstractBehavior() {
+		add(new Behavior() {
 			private static final long serialVersionUID = 1865219352602175954L;
 
-			@Override
 			public void renderHead(IHeaderResponse response) {
-				super.renderHead(response);
+
 				response.renderOnLoadJavascript("toogleDiv('completeCmdi', 'toogleLink')");
 			}
