KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > quikj > application > communicator > applications > webtalk > controller > GroupWizardIntroAction


1 /*
2  * GroupWizardIntroAction.java
3  *
4  */

5
6 package com.quikj.application.communicator.applications.webtalk.controller;
7
8 import com.quikj.application.communicator.admin.model.*;
9
10 import javax.servlet.http.*;
11 import org.apache.struts.action.*;
12 import java.sql.*;
13
14 /**
15  *
16  * @author bhm
17  */

18 public class GroupWizardIntroAction extends Action
19 {
20     
21     /** Creates a new instance of GroupManagementAction */
22     public GroupWizardIntroAction()
23     {
24     }
25     
26     public ActionForward execute(ActionMapping mapping,
27     ActionForm form,
28     HttpServletRequest request,
29     HttpServletResponse response)
30     {
31         //GroupWizardForm gform = (GroupWizardForm)form;
32

33         ActionErrors errors = new ActionErrors();
34         
35         Connection c = (Connection)request.getSession().getAttribute("connection");
36         if (c == null)
37         {
38             errors.add(ActionErrors.GLOBAL_ERROR,
39             new ActionError("error.not.logged.in"));
40             saveErrors(request, errors);
41             return mapping.findForward("logon");
42         }
43         
44         AccountElement element = (AccountElement)request.getSession().getAttribute("userInfo");
45         if (element.isAdminLevel() == false)
46         {
47             errors.add(ActionErrors.GLOBAL_ERROR,
48             new ActionError("error.insufficient.privilege"));
49             saveErrors(request, errors);
50             
51             return mapping.findForward("main_menu");
52         }
53         
54         String JavaDoc submit = (String JavaDoc) ((DynaActionForm)form).get("submit");
55         
56         /*
57         // add related tasks to the navigation bar
58         WebTalkRelatedTasks menu = new WebTalkRelatedTasks();
59         request.setAttribute("menu", menu);
60          */

61         
62         return mapping.findForward(submit);
63     }
64     
65 }
66
Popular Tags