1 package de.tivsource.page.admin.actions.others;
2
3 import org.apache.logging.log4j.LogManager;
4 import org.apache.logging.log4j.Logger;
5 import org.apache.struts2.convention.annotation.Action;
6 import org.apache.struts2.convention.annotation.Actions;
7 import org.apache.struts2.convention.annotation.Result;
8 import org.apache.struts2.tiles.annotation.TilesDefinition;
9 import org.apache.struts2.tiles.annotation.TilesDefinitions;
10 import org.apache.struts2.tiles.annotation.TilesPutAttribute;
11
12 import de.tivsource.page.admin.actions.EmptyAction;
13
14
15
16
17
18
19 @TilesDefinitions({
20 @TilesDefinition(name="others", extend = "adminTemplate", putAttributes = {
21 @TilesPutAttribute(name = "navigation", value = "/WEB-INF/tiles/active/navigation/others.jsp"),
22 @TilesPutAttribute(name = "content", value = "/WEB-INF/tiles/active/view/others.jsp")
23 }),
24 @TilesDefinition(name="menuentry", extend = "adminTemplate", putAttributes = {
25 @TilesPutAttribute(name = "navigation", value = "/WEB-INF/tiles/active/navigation/others.jsp"),
26 @TilesPutAttribute(name = "content", value = "/WEB-INF/tiles/active/view/menuentry.jsp")
27 })
28 })
29 public class IndexAction extends EmptyAction {
30
31
32
33
34 private static final long serialVersionUID = -8451802502988525138L;
35
36
37
38
39 private static final Logger LOGGER = LogManager.getLogger(IndexAction.class);
40
41 @Override
42 @Actions({
43 @Action(
44 value = "index",
45 results = { @Result(name = "success", type = "tiles", location = "others") }
46 ),
47 @Action(
48 value = "menuentry",
49 results = { @Result(name = "success", type = "tiles", location = "menuentry") }
50 )
51 })
52 public String execute() throws Exception {
53 LOGGER.info("execute() aufgerufen.");
54 return SUCCESS;
55 }
56
57 }