KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > projectmanagement > presentation > Menu


1 package projectmanagement.presentation;
2
3 import projectmanagement.presentation.BasePO;
4 import com.lutris.appserver.server.httpPresentation.*;
5 import org.enhydra.xml.xmlc.XMLObject;
6
7 /**
8  * Menu.java just offers menu for further actions.
9  *
10  * @author Sasa Bojanic
11  * @version 1.0
12  */

13 public class Menu extends BasePO {
14
15    /**
16     * Superclass method override. Returns 1.
17     */

18    protected int getRequiredAuthLevel() {
19       return 1;
20    }
21
22    /**
23     * Default event. Just show the page.
24     */

25    public XMLObject handleDefault()
26          throws HttpPresentationException {
27      
28       MenuHTML page=new MenuHTML();
29       if (getCurrentAuthLevel()==1) {
30          // disable some button images
31
page.getElementImgCustomer().getParentNode().removeChild(page.getElementImgCustomer());
32          page.getElementImgProject().getParentNode().removeChild(page.getElementImgProject());
33          page.getElementImgPayRate().getParentNode().removeChild(page.getElementImgPayRate());
34          page.getElementImgWorksheet().getParentNode().removeChild(page.getElementImgWorksheet());
35       } else {
36          page.getElementImgPersonalWorksheet().getParentNode().removeChild(page.getElementImgPersonalWorksheet());
37       }
38       return page;
39    }
40
41 }
42
43
44
Popular Tags