comparison gnv/src/main/java/de/intevation/gnv/action/ArtifactDatabaseActionBase.java @ 409:df78178e1180

Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this. gnv/trunk@599 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 22 Jan 2010 11:28:25 +0000
parents b5733f9f386b
children 15ac78a91d1b
comparison
equal deleted inserted replaced
408:b5733f9f386b 409:df78178e1180
5 5
6 import javax.servlet.http.HttpServletRequest; 6 import javax.servlet.http.HttpServletRequest;
7 import javax.servlet.http.HttpServletResponse; 7 import javax.servlet.http.HttpServletResponse;
8 8
9 import org.apache.log4j.Logger; 9 import org.apache.log4j.Logger;
10
10 import org.apache.struts.action.Action; 11 import org.apache.struts.action.Action;
11 import org.apache.struts.action.ActionForm; 12 import org.apache.struts.action.ActionForm;
12 import org.apache.struts.action.ActionForward; 13 import org.apache.struts.action.ActionForward;
13 import org.apache.struts.action.ActionMapping; 14 import org.apache.struts.action.ActionMapping;
14 15
15 /** 16 /**
16 * @author Tim Englich <tim.englich@intevation.de> 17 * @author Tim Englich <tim.englich@intevation.de>
17 * 18 *
18 */ 19 */
19 public class ArtifactDatabaseActionBase extends Action { 20 public class ArtifactDatabaseActionBase extends Action {
20
21 public static final String XSL_SHEET_DYNAMIC =
22 "WEB-INF/config/templates/describe-ui.xsl";
23
24 public static final String XSL_SHEET_STATIC =
25 "WEB-INF/config/templates/describe-ui-static.xsl";
26 21
27 protected final static String SUCCSESS_FORWARD_ID = "success"; 22 protected final static String SUCCSESS_FORWARD_ID = "success";
28 protected final static String EXCEPTION_FORWARD_ID = "success"; 23 protected final static String EXCEPTION_FORWARD_ID = "success";
29 24
30 /** 25 /**
49 @Override 44 @Override
50 public ActionForward execute(ActionMapping mapping, ActionForm form, 45 public ActionForward execute(ActionMapping mapping, ActionForm form,
51 HttpServletRequest request, 46 HttpServletRequest request,
52 HttpServletResponse response) throws Exception { 47 HttpServletResponse response) throws Exception {
53 log.debug("ArtifactDatabaseActionBase.execute"); 48 log.debug("ArtifactDatabaseActionBase.execute");
49
54 ActionForward forward = mapping.findForward(SUCCSESS_FORWARD_ID); 50 ActionForward forward = mapping.findForward(SUCCSESS_FORWARD_ID);
55 return forward; 51 return forward;
56 } 52 }
57 53
58 /** 54 /**

http://dive4elements.wald.intevation.org