source: vlo/branches/to-wicket-1.6/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloPageParameters.java @ 4201

Last change on this file since 4201 was 4201, checked in by keeloo, 10 years ago

After splitting of a branch (r4199) including code for moving from wicket 1.4 to wicket 6, some more modifications in the direction of that target.

File size: 2.0 KB
Line 
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5package eu.clarin.cmdi.vlo;
6
7import java.util.Iterator;
8import java.util.Map;
9import java.util.Set;
10import org.apache.wicket.Session;
11import org.apache.wicket.request.mapper.parameter.PageParameters;
12
13/**
14 * VLO web page parameters
15 *
16 * @author keeloo
17 */
18public class VloPageParameters extends PageParameters {
19   
20    public VloPageParameters (){
21        // needs to be here because of the other constructor
22        super ();
23    }
24   
25    public VloPageParameters (PageParameters parameters){
26        // store the parameters as VloPageParameters
27    }
28   
29    public org.apache.wicket.PageParameters convert (){
30       
31        org.apache.wicket.PageParameters param;
32       
33        // needs to be implemented
34       
35        param = null;
36       
37        return param;
38    }
39
40    /**
41     *
42     * @param param
43     * @return
44     */
45    public VloPageParameters convert (org.apache.wicket.PageParameters param){
46       
47        // move page parameters in array of objects
48        Set <Map.Entry<String,Object>> entries;
49        entries = param.entrySet();
50       
51        // iterate over the set, and put entries in new page parameters
52        VloPageParameters VloPageParameters;
53        VloPageParameters = new VloPageParameters ();
54        for (Iterator<Map.Entry<String, Object>> it = entries.iterator(); it.hasNext();) {
55            Map.Entry<String, Object> entry = it.next();
56            VloPageParameters.add(entry.getKey(), entry.getValue());
57        }
58       
59        return VloPageParameters;
60    }
61
62    /**
63     * Add this, VLO page parameters, to the parameters that are already
64     * associated with the session
65     *
66     */
67    public void addToSession() {       
68       
69        // get a themed session from the current thread
70        VloSession themedSession;
71        themedSession = (VloSession)Session.get();
72       
73        // store the parameters in the session object
74        themedSession.addVloSessionPageParameters (this);
75    }
76}
Note: See TracBrowser for help on using the repository browser.