KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ashkelon > pages > ConfigPage


1 package org.ashkelon.pages;
2
3 import org.ashkelon.util.*;
4 import java.sql.*;
5
6 /**
7  * @author Eitan Suez
8  */

9 public class ConfigPage extends Page
10 {
11    public ConfigPage()
12    {
13       super();
14    }
15    
16    public String JavaDoc handleRequest() throws SQLException
17    {
18       String JavaDoc ui_config = ServletUtils.getRequestParam(request, "ui_config");
19       String JavaDoc new_ui = "";
20       if ("classic".equals(ui_config))
21       {
22          new_ui = "basic/";
23       }
24       else if ("modern".equals(ui_config))
25       {
26          new_ui = "";
27       }
28       else if ("xul".equals(ui_config))
29       {
30          new_ui = "xul/";
31       }
32       else
33       {
34          return null;
35       }
36       
37       String JavaDoc previous_ui = (String JavaDoc) session.getAttribute("ui");
38       if (!previous_ui.equals(new_ui))
39       {
40          session.setAttribute("ui", new_ui);
41          return "config";
42       }
43       return null;
44    }
45 }
46
Popular Tags