01: package projectmanagement.presentation;
02:
03: import projectmanagement.presentation.BasePO;
04: import com.lutris.appserver.server.httpPresentation.*;
05: import org.enhydra.xml.xmlc.XMLObject;
06:
07: /**
08: * Menu.java just offers menu for further actions.
09: *
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() throws HttpPresentationException {
26:
27: MenuHTML page = new MenuHTML();
28: if (getCurrentAuthLevel() == 1) {
29: // disable some button images
30: page.getElementImgCustomer().getParentNode().removeChild(
31: page.getElementImgCustomer());
32: page.getElementImgProject().getParentNode().removeChild(
33: page.getElementImgProject());
34: page.getElementImgPayRate().getParentNode().removeChild(
35: page.getElementImgPayRate());
36: page.getElementImgWorksheet().getParentNode().removeChild(
37: page.getElementImgWorksheet());
38: } else {
39: page.getElementImgPersonalWorksheet().getParentNode()
40: .removeChild(page.getElementImgPersonalWorksheet());
41: }
42: return page;
43: }
44:
45: }
|