Rev 1014 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1014 | Rev 1057 | ||
---|---|---|---|
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
2 | <%@ page import="java.util.*,ak.hostadmiral.core.model.*" %> |
2 | <%@ page import="java.util.*,ak.hostadmiral.core.model.*" %> |
3 | <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> |
3 | <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> |
4 | <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> |
4 | <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %> |
5 | <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> |
5 | <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> |
6 | <%@ taglib uri="/WEB-INF/ak-backpath.tld" prefix="backpath" %> |
6 | <%@ taglib uri="/WEB-INF/ak-backpath.tld" prefix="backpath" %> |
7 | <%@ taglib uri="/WEB-INF/ak-strutsx.tld" prefix="strutsx" %> |
7 | <%@ taglib uri="/WEB-INF/ak-strutsx.tld" prefix="strutsx" %> |
8 | <%@ taglib uri="/WEB-INF/hostadmiral-core.tld" prefix="core" %> |
8 | <%@ taglib uri="/WEB-INF/hostadmiral-core.tld" prefix="core" %> |
9 | <html> |
9 | <html> |
10 | 10 | ||
11 | <head> |
11 | <head> |
12 | <meta http-equiv="expires" content="0"> |
12 | <meta http-equiv="expires" content="0"> |
13 | <title><bean:message key="ak.hostadmiral.page.deleting.title" /></title> |
13 | <title><bean:message key="ak.hostadmiral.page.deleting.title" /></title> |
14 | <link rel="stylesheet" type="text/css" href="<strutsx:root />/style/general.css"> |
14 | <link rel="stylesheet" type="text/css" href="<strutsx:root />/style/general.css"> |
15 | </head> |
15 | </head> |
16 | 16 | ||
17 | <body> |
17 | <body> |
18 | 18 | ||
19 | <h1><bean:message key="ak.hostadmiral.page.deleting.title" /></h1> |
19 | <h1><bean:message key="ak.hostadmiral.page.deleting.title" /></h1> |
20 | 20 | ||
- | 21 | <p> |
|
21 | <p>Object: <bean:write name="object" property="identKey" /> <bean:write name="object" property="id" /></p> |
22 | Deleting <strutsx:message name="object" property="typeKey" /> |
22 | <p>Action: <bean:write name="action" /></p> |
23 | <em><strutsx:message name="object" property="identKey" valuesProperty="identParams" /></em> |
- | 24 | </p> |
|
23 | 25 | ||
- | 26 | <p> |
|
24 | <p>FIXME: draw a real object tree here</p> |
27 | Following changes will be done is system as cascade effect of deleting the object: |
- | 28 | </p> |
|
25 | <ul> |
29 | <ul> |
26 | <% |
30 | <% |
27 | Collection cascade = (Collection)request.getAttribute("cascade"); |
31 | Collection cascade = (Collection)request.getAttribute("cascade"); |
28 | 32 | ||
29 | for(Iterator i = cascade.iterator(); i.hasNext(); ) { |
33 | Stack stack = new Stack(); |
30 | CascadeDeleteElement e = (CascadeDeleteElement)i.next(); |
34 | Iterator i = cascade.iterator(); |
31 | pageContext.setAttribute("e", e); |
- | |
32 | 35 | ||
- | 36 | while(true) { |
|
- | 37 | if(!i.hasNext()) { |
|
- | 38 | if(stack.isEmpty()) { |
|
- | 39 | break; |
|
- | 40 | } |
|
- | 41 | else { |
|
- | 42 | i = (Iterator)stack.pop(); |
|
- | 43 | %></ul><% |
|
- | 44 | continue; |
|
- | 45 | } |
|
- | 46 | } |
|
- | 47 | ||
- | 48 | CascadeDeleteElement e = (CascadeDeleteElement)i.next(); |
|
- | 49 | ||
- | 50 | pageContext.setAttribute("e", e); |
|
33 | %><li> |
51 | %><li> |
34 | <logic:equal name="e" property="effect" value="1"> |
52 | <logic:equal name="e" property="effect" value="1"> |
35 | FORBIDDEN |
53 | FORBIDDEN |
36 | </logic:equal> |
54 | </logic:equal> |
37 | <logic:equal name="e" property="effect" value="2"> |
55 | <logic:equal name="e" property="effect" value="2"> |
38 | delete |
56 | delete |
39 | </logic:equal> |
57 | </logic:equal> |
40 | <logic:equal name="e" property="effect" value="3"> |
58 | <logic:equal name="e" property="effect" value="3"> |
41 | change |
59 | change |
42 | </logic:equal> |
60 | </logic:equal> |
43 | <strutsx:message name="e" property="object.typeKey" /> |
61 | <strutsx:message name="e" property="object.typeKey" /> |
44 | <em><strutsx:message name="e" property="object.identKey" valuesProperty="object.identParams" /></em> |
62 | <em><strutsx:message name="e" property="object.identKey" valuesProperty="object.identParams" /></em> |
45 | <bean:write name="e" property="cascade" /> |
- | |
46 | </li><% |
63 | </li><% |
- | 64 | ||
- | 65 | if(e.getCascade() != null) { |
|
- | 66 | stack.push(i); |
|
- | 67 | i = e.getCascade().iterator(); |
|
- | 68 | %><ul><% |
|
- | 69 | } |
|
47 | } |
70 | } |
48 | %> |
71 | %> |
49 | </ul> |
72 | </ul> |
50 | 73 | ||
51 | <br> |
74 | <br> |
52 | <backpath:currentlink action="<%= (String)request.getAttribute("action") %>" paramId="id" paramName="object" paramProperty="id"><bean:message key="ak.hostadmiral.page.deleting.delete" /></backpath:currentlink> |
75 | <backpath:currentlink action="<%= (String)request.getAttribute("action") %>" paramId="id" paramName="object" paramProperty="id"><bean:message key="ak.hostadmiral.page.deleting.delete" /></backpath:currentlink> |
53 | <backpath:backlink><bean:message key="ak.hostadmiral.page.deleting.back" /></backpath:backlink> |
76 | <backpath:backlink><bean:message key="ak.hostadmiral.page.deleting.back" /></backpath:backlink> |
54 | 77 | ||
55 | <p> |
78 | <p> |
56 | <bean:message key="ak.hostadmiral.page.general.version" />: |
79 | <bean:message key="ak.hostadmiral.page.general.version" />: |
57 | <bean:write name="projectVersion" /> |
80 | <bean:write name="projectVersion" /> |
58 | </p> |
81 | </p> |
59 | 82 | ||
60 | </body> |
83 | </body> |
61 | 84 | ||
62 | </html> |
85 | </html> |