ontomde-uml2-struts 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +5 -0
- data/Manifest.txt +31 -0
- data/README.txt +38 -0
- data/Rakefile +32 -0
- data/lib/ontomde-uml2-struts/MessageResources.rb +356 -0
- data/lib/ontomde-uml2-struts/action.rb +886 -0
- data/lib/ontomde-uml2-struts/blob.rb +11 -0
- data/lib/ontomde-uml2-struts/exceptionHandling.rb +167 -0
- data/lib/ontomde-uml2-struts/footer.rb +128 -0
- data/lib/ontomde-uml2-struts/form.rb +483 -0
- data/lib/ontomde-uml2-struts/header.rb +37 -0
- data/lib/ontomde-uml2-struts/header_link.rb +39 -0
- data/lib/ontomde-uml2-struts/jsp_edit.rb +866 -0
- data/lib/ontomde-uml2-struts/jsp_edit_field.rb +1 -0
- data/lib/ontomde-uml2-struts/jsp_edit_js.rb +124 -0
- data/lib/ontomde-uml2-struts/jsp_index.rb +131 -0
- data/lib/ontomde-uml2-struts/localeAction.rb +641 -0
- data/lib/ontomde-uml2-struts/main.rb +140 -0
- data/lib/ontomde-uml2-struts/mappingForBean.rb +132 -0
- data/lib/ontomde-uml2-struts/mappingForJsp.rb +272 -0
- data/lib/ontomde-uml2-struts/mappingToJavaHierarchy.rb +87 -0
- data/lib/ontomde-uml2-struts/reloadAction.rb +33 -0
- data/lib/ontomde-uml2-struts/spring.rb +89 -0
- data/lib/ontomde-uml2-struts/struts-config.rb +232 -0
- data/lib/ontomde-uml2-struts/validation.rb +116 -0
- data/lib/ontomde-uml2-struts/validator.rb +341 -0
- data/lib/ontomde-uml2-struts/version.rb +7 -0
- data/lib/ontomde-uml2-struts/webXml.rb +165 -0
- data/lib/ontomde-uml2-struts/xmlForm.rb +308 -0
- data/lib/ontomde-uml2-struts.rb +34 -0
- data/test/test_ontomde-uml2-struts.rb +0 -0
- metadata +112 -0
@@ -0,0 +1,866 @@
|
|
1
|
+
# ------------------------
|
2
|
+
# Different widgets
|
3
|
+
# ------------------------
|
4
|
+
# OAS (Object Association Single)
|
5
|
+
# OAM (Object Association Multiple)
|
6
|
+
# OCS (Object Composition Single)
|
7
|
+
# OCM (Object Composition Multiple)
|
8
|
+
#
|
9
|
+
# EPS (Enumeration Property Single)
|
10
|
+
# EPM (Enumeration Property Multiple)
|
11
|
+
#
|
12
|
+
# BPS (Boolean Property Single)
|
13
|
+
# CPS (Calendar Property Single)
|
14
|
+
# FPS (Float Property Single)
|
15
|
+
# IPS (Integer Property Single)
|
16
|
+
# SPS (String Property Single)
|
17
|
+
# TPS (Timestamp Property Single)
|
18
|
+
|
19
|
+
module Mrdf_Model
|
20
|
+
def struts_encloseWrite(before,after,&block)
|
21
|
+
write(before)
|
22
|
+
yield
|
23
|
+
write(after)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
module Mrdf_Resource
|
27
|
+
def struts_encloseWrite(before,after,&block)
|
28
|
+
write(before)
|
29
|
+
yield
|
30
|
+
write(after)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
module Mrdf_Model
|
35
|
+
|
36
|
+
def eachStrutsBean
|
37
|
+
uml_Class_all.each { |c|
|
38
|
+
next if c.kind_of?(Muml_Enumeration)
|
39
|
+
next if c.kind_of?(Muml_Interface)
|
40
|
+
next if c.java_ignoreMe?
|
41
|
+
yield(c)
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
def eachStrutsFormset
|
46
|
+
uml_Class_all.each { |c|
|
47
|
+
next if c.kind_of?(Muml_Enumeration)
|
48
|
+
next if c.kind_of?(Muml_Interface)
|
49
|
+
next if c.java_ignoreMe?
|
50
|
+
yield(c)
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
def struts_edit_generate
|
55
|
+
uml_Class_all.each { |c|
|
56
|
+
next if c.kind_of?(Muml_Enumeration)
|
57
|
+
next if c.kind_of?(Muml_Interface)
|
58
|
+
next if c.java_ignoreMe?
|
59
|
+
#next if c.db_isTransient?
|
60
|
+
c.struts_edit_generate
|
61
|
+
c.struts_row_generate
|
62
|
+
}
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
module Mrdf_Model
|
67
|
+
STRUTS_SESSION_TIMEOUT_IN_MINUTES_RES="server.session.timeout.minutes"
|
68
|
+
end
|
69
|
+
|
70
|
+
def struts_writeTimeoutIndicator()
|
71
|
+
write %{
|
72
|
+
<div style="display: none; left: 136px; top: 112px;" id="bubble_tooltip">
|
73
|
+
<div class="bubble_top"><span></span></div>
|
74
|
+
<div class="bubble_middle"><span id="bubble_tooltip_content">Message Help To add</span></div>
|
75
|
+
<div class="bubble_bottom"></div>
|
76
|
+
</div>
|
77
|
+
<script>
|
78
|
+
function showToolTip(e,text){
|
79
|
+
if(document.all)e = event;
|
80
|
+
|
81
|
+
var obj = document.getElementById('bubble_tooltip');
|
82
|
+
var obj2 = document.getElementById('bubble_tooltip_content');
|
83
|
+
obj2.innerHTML = text;
|
84
|
+
obj.style.display = 'block';
|
85
|
+
var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
|
86
|
+
if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0;
|
87
|
+
var leftPos = e.clientX - 100;
|
88
|
+
if(leftPos<0)leftPos = 0;
|
89
|
+
obj.style.left = leftPos + 'px';
|
90
|
+
obj.style.top = e.clientY - obj.offsetHeight -1 + st + 'px';
|
91
|
+
}
|
92
|
+
|
93
|
+
function hideToolTip()
|
94
|
+
{
|
95
|
+
document.getElementById('bubble_tooltip').style.display = 'none';
|
96
|
+
|
97
|
+
}
|
98
|
+
</script>
|
99
|
+
|
100
|
+
<%-- TPL:1 BEGIN --%>
|
101
|
+
<%-- Start JavaScript Clock Code --%>
|
102
|
+
<a id="js_remaining_time" onmouseover="showToolTip(event,'This is a simple, simple test');return false" onmouseout="hideToolTip()">
|
103
|
+
<script language="javascript">
|
104
|
+
load_time=new Date();
|
105
|
+
server_timeout=#{struts_writeMsg(Mrdf_Model::STRUTS_SESSION_TIMEOUT_IN_MINUTES_RES)} // minutes
|
106
|
+
function js_remaining_time(){
|
107
|
+
var clock_div = document.getElementById('js_remaining_time');
|
108
|
+
clock_div.innerHTML = Math.floor(server_timeout-(new Date()-load_time)/1000/60)+"'"
|
109
|
+
setTimeout("js_remaining_time()", 10000);
|
110
|
+
}
|
111
|
+
js_remaining_time();
|
112
|
+
</script>
|
113
|
+
</a>
|
114
|
+
<div id="TipLayer" style="visibility:hidden;position:absolute;z-index:1000;top:-100;"></div>
|
115
|
+
|
116
|
+
<%-- End JavaScript Clock Code --%>
|
117
|
+
<%-- TPL:1 END --%>
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
module Muml_Class
|
122
|
+
|
123
|
+
# return identifier of the default tab
|
124
|
+
def struts_defaultTabId
|
125
|
+
return "all"
|
126
|
+
end
|
127
|
+
|
128
|
+
# Returns the internal where to generate file for this object.
|
129
|
+
def struts_jsp_edit_path
|
130
|
+
path="form"
|
131
|
+
return "pages/#{java_InternalFilePath}/#{path}/#{java_Name}#{context[:struts_tab].java_Name}.jsp"
|
132
|
+
end
|
133
|
+
# Returns the internal where to generate file for this object.
|
134
|
+
def struts_jsp_row_path
|
135
|
+
path="form"
|
136
|
+
return "pages/#{java_InternalFilePath}/#{path}/#{java_Name}-row.jsp"
|
137
|
+
end
|
138
|
+
|
139
|
+
def struts_row_generate
|
140
|
+
mtk_writeSession( %{#{context[:webContentDir]}/#{struts_jsp_row_path}} ) {
|
141
|
+
mtk_context( :struts_curClass => self) {
|
142
|
+
struts_edit_writeHeader
|
143
|
+
write("<%-- TPL:2 BEGIN --%>\n<tr>")
|
144
|
+
struts_formAttribute.each { |a|
|
145
|
+
next if a.uml_name_one=="id"
|
146
|
+
write("<%-- UML PROPERTY: #{a.uml_name}--%>\n")
|
147
|
+
write("<td>");
|
148
|
+
write("</td>");
|
149
|
+
}
|
150
|
+
write("</tr>\n<%-- TPL:2 END --%>\n")
|
151
|
+
}
|
152
|
+
}
|
153
|
+
end
|
154
|
+
|
155
|
+
def struts_edit_generate
|
156
|
+
return if java_ignoreMe?
|
157
|
+
#path=context[:jspEditMode] ? "form_item" : "view_item"
|
158
|
+
struts_ownedTab.each { |i|
|
159
|
+
label="#{i}"
|
160
|
+
f=self.struts_actionForm_one
|
161
|
+
mtk_context(:struts_tab => i ) {
|
162
|
+
|
163
|
+
|
164
|
+
mtk_writeSession( %{#{context[:webContentDir]}/#{struts_jsp_edit_path}} ) {
|
165
|
+
#log.debug { %{#{context[:webContentDir]}/{struts_jsp_edit_path}} }
|
166
|
+
struts_edit_writeHeader
|
167
|
+
before=""
|
168
|
+
after=""
|
169
|
+
if(context[:generateXMLStrutsForm])
|
170
|
+
before=%{<logic:notPresent parameter="FLEX">\n}
|
171
|
+
after=%{</logic:notPresent>\n}
|
172
|
+
end
|
173
|
+
|
174
|
+
struts_encloseWrite(before,after) {
|
175
|
+
mtk_context( :struts_curClass => self) {
|
176
|
+
struts_edit_writePage
|
177
|
+
}}
|
178
|
+
before=""
|
179
|
+
after=""
|
180
|
+
if(context[:generateXMLStrutsForm])
|
181
|
+
before=%{<logic:present parameter="FLEX">\n}
|
182
|
+
after=%{</logic:present>\n}
|
183
|
+
end
|
184
|
+
struts_encloseWrite(before,after) {
|
185
|
+
struts_edit_writePageXML(f)
|
186
|
+
}
|
187
|
+
}}}
|
188
|
+
end
|
189
|
+
|
190
|
+
STRUTS_XML_VIEW_PREFIX="src."
|
191
|
+
def struts_edit_writePageXML(f)
|
192
|
+
return unless context[:generateXMLStrutsForm]
|
193
|
+
write( %{
|
194
|
+
<message>
|
195
|
+
<meta>
|
196
|
+
<html:link action="/#{java_Name}#{context[:struts_tab].java_Name}-submit"/>
|
197
|
+
<timeout_ms><%= 3*60*60*1000 %></timeout_ms>
|
198
|
+
<timezone><bean:write name="#{struts_actionForm_one.java_Name}" property="#{::Muml_Classifier::STRUTS_SETTIMEZONE_FIELD}"/></timezone>
|
199
|
+
<sessionId><%=session.getId()%></sessionId>
|
200
|
+
<view>#{STRUTS_XML_VIEW_PREFIX}#{java_qualifiedName}</view><logic:messagesPresent>
|
201
|
+
<html:messages id="error"><errors>
|
202
|
+
<error><bean:write name="error"/></error></html:messages>
|
203
|
+
</errors>
|
204
|
+
</logic:messagesPresent></meta>
|
205
|
+
<form>
|
206
|
+
<bean:write name="#{f.java_Name}" property="#{::Muml_Class::STRUTS_XML_FORM_PROPERTY}" filter="false" />
|
207
|
+
</form>
|
208
|
+
</message>
|
209
|
+
})
|
210
|
+
end
|
211
|
+
|
212
|
+
def struts_edit_writePage
|
213
|
+
struts_edit_writeHTML {
|
214
|
+
struts_edit_writeHead {
|
215
|
+
struts_jspEdit_generateJavascript
|
216
|
+
struts_header_link_generate
|
217
|
+
struts_jspEditwriteSelfJSInclude
|
218
|
+
struts_edit_writeTitle
|
219
|
+
}
|
220
|
+
struts_edit_writeBody
|
221
|
+
}
|
222
|
+
end
|
223
|
+
|
224
|
+
|
225
|
+
def struts_edit_writeHTML(&block)
|
226
|
+
write("<html:html><%-- T:1004 --%>")
|
227
|
+
yield
|
228
|
+
write("</html:html><%-- T:1004 --%>")
|
229
|
+
end
|
230
|
+
|
231
|
+
def struts_edit_writeHeader
|
232
|
+
|
233
|
+
# encoding must be ISO8859-1 to avoid bug with forms and accentuated characters.
|
234
|
+
|
235
|
+
write <<END
|
236
|
+
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
237
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
238
|
+
<%@ page contentType="text/html;charset=ISO8859-1" %>
|
239
|
+
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
|
240
|
+
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
|
241
|
+
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
|
242
|
+
END
|
243
|
+
if context[:jspUseXmdaTaglib]
|
244
|
+
write <<END
|
245
|
+
<%@ taglib uri="http://orange.fr/2007/xmda/struts-tags" prefix="xmda" %>
|
246
|
+
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
|
247
|
+
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
|
248
|
+
END
|
249
|
+
|
250
|
+
if context[:security]
|
251
|
+
write <<END
|
252
|
+
<%@ taglib uri="http://orange.fr/2007/xmda/struts-security-tags" prefix="xmdas" %>
|
253
|
+
END
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
257
|
+
end
|
258
|
+
def struts_edit_writeHead(&block)
|
259
|
+
write "<head>"
|
260
|
+
yield
|
261
|
+
write "</head>"
|
262
|
+
end
|
263
|
+
|
264
|
+
def struts_edit_writeTitle
|
265
|
+
write %{<title>#{struts_writeMsg("#{self.java_qualifiedName}.title")}</title>}
|
266
|
+
end
|
267
|
+
|
268
|
+
|
269
|
+
# write tabs in JSP
|
270
|
+
# NOTE: CSS is design in such a way that active tab
|
271
|
+
# is the last one and its id is menuOptDivId0
|
272
|
+
def struts_jsp_writeTabBar
|
273
|
+
return if struts_ownedTab.size <= 1
|
274
|
+
write %{<div class="menu" id="menuDivId">\n}
|
275
|
+
cmpt =1;
|
276
|
+
onglet_actif=context[:struts_tab]
|
277
|
+
struts_ownedTab.each { |tab|
|
278
|
+
id=tab.java_Name
|
279
|
+
label="#{self.java_qualifiedName}.#{id}.tab"
|
280
|
+
if tab==onglet_actif
|
281
|
+
|
282
|
+
|
283
|
+
write %{\n<div class="menuOptnSelect" id="menuOptDivId0">
|
284
|
+
<div class="menuOptnSelectLink"><html:link onclick="#{STRUTS_REFRESH_ACTION}('#{id}');return false;" page="">#{struts_writeMsg(label)}</html:link></div>
|
285
|
+
</div>
|
286
|
+
\n}
|
287
|
+
|
288
|
+
else
|
289
|
+
if cmpt==1
|
290
|
+
write %{\n<div class="menuOptn" id="menuOptDivId#{id}" style="display:none;">
|
291
|
+
<div class="menuLink"><html:link onclick="#{STRUTS_REFRESH_ACTION}('#{id}');return false;" page="">#{struts_writeMsg(label)}</html:link></div>
|
292
|
+
</div>}
|
293
|
+
else
|
294
|
+
write %{\n<div class="menuOptn" id="menuOptDivId#{id}">
|
295
|
+
<div class="menuLink"><html:link onclick="#{STRUTS_REFRESH_ACTION}('#{id}');return false;" page="">#{struts_writeMsg(label)}</html:link></div>
|
296
|
+
</div>}
|
297
|
+
end
|
298
|
+
|
299
|
+
cmpt=cmpt+1;
|
300
|
+
end
|
301
|
+
}
|
302
|
+
write %{</div>\n}
|
303
|
+
end
|
304
|
+
|
305
|
+
# form enctype attribute
|
306
|
+
# useful when form includes a field of type blob
|
307
|
+
def struts_formEncTypeAttribute
|
308
|
+
#TODO: add enctype *only* if form has a blob field
|
309
|
+
return %{ enctype="multipart/form-data"}
|
310
|
+
end
|
311
|
+
|
312
|
+
#name of the javascript openTab method used to switch to the requested tab.
|
313
|
+
|
314
|
+
def struts_edit_writeBody
|
315
|
+
mtk_context(:strutsActionName => "/#{java_Name}#{context[:struts_tab].java_Name}-submit" ) {
|
316
|
+
struts_encloseWrite(%{<body >\n<html:form #{struts_formEncTypeAttribute} action="#{context[:strutsActionName]}">\n<center>},"</center>\n</html:form></body>\n") {
|
317
|
+
if(context[:generateXMLStrutsForm])
|
318
|
+
write <<END
|
319
|
+
<!-- DEBUG SWITCH -->
|
320
|
+
<input type="checkbox" name="FLEX"/>
|
321
|
+
END
|
322
|
+
end
|
323
|
+
|
324
|
+
struts_header_generate
|
325
|
+
write <<END
|
326
|
+
<%-- ********* CORPS DE PAGE ********** --%>
|
327
|
+
<logic:messagesPresent>
|
328
|
+
<div>
|
329
|
+
<table class="tableForm">
|
330
|
+
<tr>
|
331
|
+
<td class="attributeIcons">
|
332
|
+
<img src="#{css_path_model}/#{css_color_class}/image/btnWarning.gif" alt="" width="25" height="25" border="0" />
|
333
|
+
</td>
|
334
|
+
<td>
|
335
|
+
<h1>
|
336
|
+
#{struts_writeMsg("errors.header")}
|
337
|
+
</h1>
|
338
|
+
</td>
|
339
|
+
</tr>
|
340
|
+
</table>
|
341
|
+
<html:messages id="error">
|
342
|
+
<p class="attributeError">
|
343
|
+
<bean:write name="error"/>
|
344
|
+
</p>
|
345
|
+
</html:messages>
|
346
|
+
</div>
|
347
|
+
</logic:messagesPresent>
|
348
|
+
|
349
|
+
|
350
|
+
END
|
351
|
+
struts_jsp_writeTabBar
|
352
|
+
|
353
|
+
write "<SCRIPT>\n"
|
354
|
+
context[:struts_tab].struts_ownedAttribute.each { |a|
|
355
|
+
next unless a.umlx_isComposite?
|
356
|
+
#next if a.umlx_oneSide?
|
357
|
+
f="createAndAdd#{a.java_NameBean}"
|
358
|
+
write %{
|
359
|
+
function #{f}(reqType) {
|
360
|
+
document.forms[0].#{Muml_Class::STRUTS_DISPATCH_FIELD_NAME}.value="#{f}";
|
361
|
+
document.forms[0].#{STRUTS_REQUESTED_CREATION_TYPE_FIELD_NAME}.value=reqType;
|
362
|
+
document.forms[0].submit();
|
363
|
+
}
|
364
|
+
}
|
365
|
+
}
|
366
|
+
write "<!-- THERE -->\n"
|
367
|
+
|
368
|
+
write <<END_SCRIPT
|
369
|
+
</SCRIPT>
|
370
|
+
END_SCRIPT
|
371
|
+
|
372
|
+
write <<END
|
373
|
+
<div class="body">
|
374
|
+
<div class="bodyTop"/><div class="bodyContent">
|
375
|
+
|
376
|
+
END
|
377
|
+
|
378
|
+
|
379
|
+
write <<END
|
380
|
+
|
381
|
+
<h1>#{struts_writeMsg("#{java_qualifiedName}.title")}</h1>
|
382
|
+
|
383
|
+
#{mtk_stss{struts_jspEdit_write_Operation}}
|
384
|
+
END
|
385
|
+
struts_edit_writeForm
|
386
|
+
write <<END
|
387
|
+
</div>
|
388
|
+
<div class="bodyBottom"></div>
|
389
|
+
|
390
|
+
|
391
|
+
END
|
392
|
+
struts_footer_generate
|
393
|
+
write <<END
|
394
|
+
|
395
|
+
</div>
|
396
|
+
END
|
397
|
+
}}
|
398
|
+
end
|
399
|
+
|
400
|
+
def struts_edit_writeForm
|
401
|
+
#<html:text property="xmda_action"/>
|
402
|
+
|
403
|
+
|
404
|
+
struts_edit_writeFields
|
405
|
+
write <<END
|
406
|
+
<%-- ****** --%>
|
407
|
+
<%-- SUBMIT --%>
|
408
|
+
<%-- ****** --%>
|
409
|
+
<div>
|
410
|
+
<input type="hidden" name="#{STRUTS_REQUESTED_CREATION_TYPE_FIELD_NAME}"/>
|
411
|
+
<html:hidden property="#{Muml_Class::STRUTS_DISPATCH_FIELD_NAME}"/>
|
412
|
+
<input type="hidden" name="#{Muml_Class::STRUTS_REQUESTED_TAB}"/>
|
413
|
+
<html:hidden property="#{Muml_Class::STRUTS_SGBD_STATE}"/>
|
414
|
+
<SCRIPT>function sel(target) {document.forms[0].#{Muml_Class::STRUTS_DISPATCH_FIELD_NAME}.value=target;}</SCRIPT>
|
415
|
+
</div><br/>
|
416
|
+
<div class="boutons" align="right">
|
417
|
+
<%-- <html:submit styleClass="boutonForm" onclick="#{STRUTS_RETURN_ACTION}();return false;">#{struts_writeMsg("button.validate")}</html:submit> --%>
|
418
|
+
<html:submit styleClass="boutonForm" onclick="#{STRUTS_PROCEED_ACTION}();return false;">#{struts_writeMsg("button.validate")}</html:submit>
|
419
|
+
<%-- <html:submit onclick="sel('delete');" styleClass="boutonForm">#{struts_writeMsg("button.delete")}</html:submit> --%>
|
420
|
+
<html:reset styleClass="boutonForm">#{struts_writeMsg("button.reset")}</html:reset>
|
421
|
+
<%-- <html:cancel styleClass="boutonForm">#{struts_writeMsg("button.cancel")}</html:cancel> --%>
|
422
|
+
</div>
|
423
|
+
END
|
424
|
+
end
|
425
|
+
|
426
|
+
def struts_jspEdit_write_Operation
|
427
|
+
uml_ownedOperation.each {|biz|
|
428
|
+
next unless biz.uml_visibility_one.isPublic?
|
429
|
+
next unless biz.umlx_businessMethod?
|
430
|
+
next if biz.struts_bizOperationReverse.empty?
|
431
|
+
|
432
|
+
#TODO:r�cuperer le nom MPC par navigation!
|
433
|
+
|
434
|
+
#<html:form action="/#{self.java_Name}#{biz.java_Name}MPC-new.do">
|
435
|
+
#<html:id>
|
436
|
+
#<html:submit name="[#{biz.uml_name}]"/>
|
437
|
+
#</html:form>
|
438
|
+
|
439
|
+
# write %{
|
440
|
+
# <a href="" onclick="#{biz.java_Name}();return false;">
|
441
|
+
# [#{biz.java_Name}]
|
442
|
+
# </a>
|
443
|
+
# }
|
444
|
+
write %{
|
445
|
+
<html:submit styleClass="boutonForm" onclick="#{biz.java_Name}();return false;">#{struts_writeMsg("#{biz.umlx_owner_one.java_qualifiedName}.#{biz.java_Name}")}</html:submit>
|
446
|
+
}
|
447
|
+
|
448
|
+
|
449
|
+
}
|
450
|
+
end
|
451
|
+
|
452
|
+
|
453
|
+
def struts_edit_writeFields
|
454
|
+
context[:struts_tab].struts_ownedAttribute.each { |a|
|
455
|
+
next if a.uml_name_one=="id"
|
456
|
+
a.struts_edit_writeFieldProp(self)
|
457
|
+
}
|
458
|
+
end
|
459
|
+
|
460
|
+
end
|
461
|
+
|
462
|
+
###moved to helpermodule Muml_Enumeration
|
463
|
+
###moved to helper def struts_edit_writeField(field,owner)
|
464
|
+
###moved to helper# write %{
|
465
|
+
###moved to helper#<html:select property="#{field.java_Name}">
|
466
|
+
###moved to helper# <html:optionsCollection property="#{field.java_Name}Sug"/>
|
467
|
+
###moved to helper#</html:select>
|
468
|
+
###moved to helper# }
|
469
|
+
###moved to helper#TODO: utiliser le suggester
|
470
|
+
###moved to helperwrite %{<html:select property="#{field.java_Name}">\n}
|
471
|
+
###moved to helperfield.uml_type_one.uml_ownedLiteral.each { |ol|
|
472
|
+
###moved to helper write %{ <html:option value="#{ol}" key="#{field.uml_type_one.java_qualifiedName}.#{ol}"/>\n}
|
473
|
+
###moved to helper }
|
474
|
+
###moved to helperwrite %{</html:select>\n}
|
475
|
+
###moved to helper
|
476
|
+
###moved to helper#elt="#{field.java_Name}_eltSsug"
|
477
|
+
###moved to helper#write %{
|
478
|
+
###moved to helper#<%-- TODO (retrieve label from ressource for localization)
|
479
|
+
###moved to helper# <html:select property="#{field.java_Name}">
|
480
|
+
###moved to helper# <logic:iterate id="#{elt}" name="org.apache.struts.taglib.html.BEAN" property="#{field.java_Name}Sug">
|
481
|
+
###moved to helper# <%= TagUtils.getInstance().message(pageContext, bundle, locale, key); %>
|
482
|
+
###moved to helper#
|
483
|
+
###moved to helper# <html:option value="value">#{field.uml_type_one.java_qualifiedName}.<bean:write name="#{elt}" property="label"/></html:option>
|
484
|
+
###moved to helper# </logic:iterate>
|
485
|
+
###moved to helper#</html:select> --%>
|
486
|
+
###moved to helper# }
|
487
|
+
###moved to helper end
|
488
|
+
###moved to helperend
|
489
|
+
module Muml_DataType
|
490
|
+
#error style used for form fields
|
491
|
+
STRUTS_ERROR_STYLE=%{errorStyle="background-color: yellow"}
|
492
|
+
|
493
|
+
def struts_edit_writeField(field,owner)
|
494
|
+
tpl=JavaMapping.instance.getTemplate(self)
|
495
|
+
write tpl.getJSP(self,field,owner)
|
496
|
+
end
|
497
|
+
end
|
498
|
+
module Muml_Enumeration
|
499
|
+
def struts_edit_writeField(field,owner)
|
500
|
+
tpl=JavaMapping.instance.getTemplate(self)
|
501
|
+
write tpl.getJSP(self,field,owner)
|
502
|
+
end
|
503
|
+
end
|
504
|
+
|
505
|
+
module Muml_Classifier
|
506
|
+
def struts_edit_writeField(field,owner)
|
507
|
+
if field.nil?
|
508
|
+
log.error { "nil field in #{self}" }
|
509
|
+
return
|
510
|
+
end
|
511
|
+
os=field.umlx_oneSide?
|
512
|
+
ic=field.umlx_isComposite?
|
513
|
+
if os && !ic
|
514
|
+
# OAS (Object Association Single)
|
515
|
+
struts_edit_writeFieldOne(field,owner)
|
516
|
+
elsif (!os) && (!ic)
|
517
|
+
# OAM (Object Association Multiple)
|
518
|
+
struts_edit_writeFieldMany(field,owner)
|
519
|
+
elsif os && ic
|
520
|
+
# OCS (Object Composition Single)
|
521
|
+
struts_edit_writeFieldOneCompo(field,owner)
|
522
|
+
elsif (!os) && ic
|
523
|
+
# OCM (Object Composition Multiple)
|
524
|
+
struts_edit_writeFieldManyCompo(field,owner)
|
525
|
+
end
|
526
|
+
end
|
527
|
+
def struts_edit_writeFieldMany(field,owner)
|
528
|
+
struts_edit_writeFieldGeneric(field,owner,true,false)
|
529
|
+
struts_edit_writeSelectAndAdd(field,owner)
|
530
|
+
end
|
531
|
+
def struts_edit_writeSelectAndAdd(field,owner)
|
532
|
+
return if field.uml_isReadOnly?
|
533
|
+
elt="#{field.java_Name}_add"
|
534
|
+
struts_encloseWrite( %{<select name="#{field.java_Name}_add" onchange="add#{field.java_NameBean}(value);"> \n<option>--</option>\n} ,%{</select>\n}) {
|
535
|
+
struts_encloseWrite( %{<logic:iterate id="#{elt}" name="#{owner.java_Name}StrutsForm" property="reference.#{field.java_Name}Sug" >\n} ,%{</logic:iterate>}) {
|
536
|
+
struts_encloseWrite( %{ <option value="<bean:write name="#{elt}" property="id"/>">\n},%{ </option> \n}) {
|
537
|
+
field.uml_type_one.struts_formAttribute.each { |a|
|
538
|
+
#next if a.uml_name_one=="id"
|
539
|
+
next if a.uml_name_one=="owner"
|
540
|
+
next if a.uml_type_one.kind_of?(Muml_Class)
|
541
|
+
write %{<bean:write name="#{elt}" property="#{a.java_Name}"/>, }
|
542
|
+
}}}}
|
543
|
+
end
|
544
|
+
|
545
|
+
def struts_edit_writeFieldManyCompo(field,owner)
|
546
|
+
struts_edit_writeFieldCompo(field,owner,true)
|
547
|
+
end
|
548
|
+
def struts_edit_writeFieldOneCompo(field,owner)
|
549
|
+
struts_edit_writeFieldCompo(field,owner,false)
|
550
|
+
end
|
551
|
+
|
552
|
+
def struts_edit_writeFieldCompo(field,owner,isMany)
|
553
|
+
struts_edit_writeFieldGeneric(field,owner,isMany,true)
|
554
|
+
end
|
555
|
+
|
556
|
+
def struts_edit_writeFieldGenericIsCompo(field,owner,isMany,isCompo)
|
557
|
+
return unless isCompo
|
558
|
+
before=""
|
559
|
+
after=""
|
560
|
+
if !isMany
|
561
|
+
# only display creater if adding one more is ok.
|
562
|
+
before=%{<logic:empty name="#{owner.java_Name}StrutsForm" property="reference.#{field.java_Name}">\n}
|
563
|
+
after=%{</logic:empty>\n}
|
564
|
+
end
|
565
|
+
|
566
|
+
struts_encloseWrite( before,after) {
|
567
|
+
if context[:jspUseXmdaTaglib]
|
568
|
+
write <<END
|
569
|
+
|
570
|
+
<div style=' width:400px; overflow:left; display: none; ' class="dialog" id="Popup#{field.java_NameBean}">
|
571
|
+
<div class="alphacube_close" onclick="javascript:show_sel('#{field.java_Name}_createAndAdd');document.getElementById('Popup#{field.java_NameBean}').style.display='none';document.getElementById('add#{field.java_NameBean}').style.display='block';"> </div>
|
572
|
+
<table class="top table_window">
|
573
|
+
<tbody>
|
574
|
+
<tr>
|
575
|
+
<td class="alphacube_nw"> </td>
|
576
|
+
<td class="alphacube_n">
|
577
|
+
<div class="alphacube_title title_window top_draggable">
|
578
|
+
#{struts_writeMsg("#{field.umlx_owner_one.java_qualifiedName}.#{field.java_Name}")}</div></td>
|
579
|
+
<td class="alphacube_ne"> </td>
|
580
|
+
</tr>
|
581
|
+
</tbody>
|
582
|
+
</table>
|
583
|
+
<table class="mid table_window">
|
584
|
+
<tbody>
|
585
|
+
<tr>
|
586
|
+
<td class="alphacube_w"></td>
|
587
|
+
<td class="alphacube_content" valign="top">
|
588
|
+
<div class="alphacube_content">
|
589
|
+
<center><br/>
|
590
|
+
<select name="#{field.java_Name}_createAndAdd" onchange="createAndAdd#{field.java_NameBean}(options[selectedIndex].value);return false;" id="#{field.java_Name}_createAndAdd">
|
591
|
+
<xmda:i18noptionsCollection name="#{owner.java_Name}StrutsForm" property="createAndAdd#{field.java_NameBean}Sug" />
|
592
|
+
</select>
|
593
|
+
</center><br/>
|
594
|
+
</div></td>
|
595
|
+
<td class="alphacube_e"></td>
|
596
|
+
</tr>
|
597
|
+
</tbody>
|
598
|
+
</table>
|
599
|
+
<table class="bot table_window">
|
600
|
+
<tbody>
|
601
|
+
<tr>
|
602
|
+
<td class="alphacube_sw"> </td>
|
603
|
+
<td class="alphacube_s"><div class="status_bar bottom_draggable"> </div></td>
|
604
|
+
<td class="alphacube_sizer" > </td>
|
605
|
+
</tr>
|
606
|
+
</tbody>
|
607
|
+
</table>
|
608
|
+
</div>
|
609
|
+
<div style="color:#FF5400;background-color:#FAFCEB;" id='add#{field.java_NameBean}'>
|
610
|
+
<a onClick="javascript:hide_sel('#{field.java_Name}_createAndAdd');document.getElementById('Popup#{field.java_NameBean}').style.display='block';document.getElementById('add#{field.java_NameBean}').style.display='none';" >
|
611
|
+
<img src="res//orange/image/plus.gif" alt="Add" border="0" />
|
612
|
+
</a> <bean:message key="label.helper.none"/>
|
613
|
+
</div>
|
614
|
+
|
615
|
+
END
|
616
|
+
else
|
617
|
+
write %{
|
618
|
+
|
619
|
+
<%-- begin TPL:1006 --%>
|
620
|
+
<select name="#{field.java_Name}_createAndAdd" onchange="createAndAdd#{field.java_NameBean}(options[selectedIndex].value);return false;">
|
621
|
+
<logic:iterate id="_#{field.java_Name}" name="#{owner.java_Name}StrutsForm" property="createAndAdd#{field.java_NameBean}Sug" >
|
622
|
+
<option value="<bean:write name="_#{field.java_Name}" property="value" />" >
|
623
|
+
<bean:define id="_id">
|
624
|
+
<bean:write name="_#{field.java_Name}" property="label" />
|
625
|
+
</bean:define>
|
626
|
+
<%-- TODO: eviter entrelacement balises XML --%>
|
627
|
+
<bean:message key="<%= _id %>"/>
|
628
|
+
</option>
|
629
|
+
</logic:iterate>
|
630
|
+
</select>
|
631
|
+
<SCRIPT> <%-- TODO : supprimer javascript --%>
|
632
|
+
document.forms[0].#{field.java_Name}_createAndAdd.value="#{::Muml_Property::NIL_LVB_KEY}";
|
633
|
+
</SCRIPT>
|
634
|
+
<%-- end TPL:1006 --%>
|
635
|
+
}
|
636
|
+
end
|
637
|
+
}
|
638
|
+
end
|
639
|
+
|
640
|
+
def struts_edit_writeFieldGeneric(field,owner,isMany,isCompo)
|
641
|
+
#adds create and add section
|
642
|
+
struts_edit_writeFieldGenericIsCompo(field,owner,isMany,isCompo)
|
643
|
+
|
644
|
+
#adds table displaying already selected elements
|
645
|
+
struts_edit_writeFieldGeneric_DisplayTable(field,owner,isMany,isCompo)
|
646
|
+
end
|
647
|
+
|
648
|
+
def struts_edit_writeFieldGeneric_DisplayTable(field,owner,isMany,isCompo)
|
649
|
+
elt="elt_#{field.java_Name}"
|
650
|
+
struts_encloseWrite(%{<logic:notEmpty name="#{owner.java_Name}StrutsForm" property="reference.#{field.java_Name}">\n},'</logic:notEmpty>') {
|
651
|
+
if field.context[:jspUseXmdaTaglib]
|
652
|
+
struts_edit_writeFieldGeneric_DisplayTable_displayTag(field,owner,isMany,isCompo)
|
653
|
+
else
|
654
|
+
struts_edit_writeFieldGeneric_DisplayTable_strutsOnly(field,owner,isMany,isCompo)
|
655
|
+
end
|
656
|
+
}
|
657
|
+
end
|
658
|
+
|
659
|
+
def struts_edit_writeFieldGeneric_DisplayTable_displayTag(field,owner,isMany,isCompo)
|
660
|
+
elt="elt_#{field.java_Name}"
|
661
|
+
struts_encloseWrite(%{
|
662
|
+
|
663
|
+
<div class="blockScroll">
|
664
|
+
<%--
|
665
|
+
You can specify the column to sort by adding sortable="true"
|
666
|
+
By default this is the first column
|
667
|
+
--%>
|
668
|
+
<display:table id="#{elt}" name="sessionScope.#{owner.java_Name}StrutsForm.reference.#{field.java_Name}" defaultorder="descending" defaultsort="1" class="CWTable">
|
669
|
+
<display:column class='action'>
|
670
|
+
<a onclick='removeAndDelete#{field.java_NameBean}("<c:out value="${#{elt}.id}"/>");return false;' >
|
671
|
+
<img src="#{css_path_model}/#{css_color_class}/image/btnDelete.gif" alt="" border="0" height="16" width="16"/>
|
672
|
+
</a>
|
673
|
+
</display:column>
|
674
|
+
<display:column class='action'>
|
675
|
+
<a onclick='edit#{field.java_NameBean}("<c:out value="${#{elt}.id}"/>");return false;' >
|
676
|
+
<img src="#{css_path_model}/#{css_color_class}/image/btnCreate.gif" alt="" border="0" height="16" width="16"/>
|
677
|
+
</a>
|
678
|
+
</display:column>
|
679
|
+
},
|
680
|
+
%{</display:table>\n </div>
|
681
|
+
|
682
|
+
}) {
|
683
|
+
field.uml_type_one.struts_formAttribute.each { |a|
|
684
|
+
next if a.uml_name_one=="id"
|
685
|
+
next if a.uml_name_one=="owner"
|
686
|
+
t=a.uml_type_one
|
687
|
+
next unless a.uml_type_one.kind_of?(Muml_Enumeration) || a.uml_type_one.kind_of?(Muml_DataType)
|
688
|
+
tpl=JavaMapping.instance.getTemplate(t)
|
689
|
+
tpl.struts_edit_writeFieldGeneric_DisplayTable_displayTag_column(a)
|
690
|
+
}
|
691
|
+
}
|
692
|
+
end
|
693
|
+
|
694
|
+
def struts_edit_writeFieldGeneric_DisplayTable_strutsOnly(field,owner,isMany,isCompo)
|
695
|
+
struts_encloseWrite( %{
|
696
|
+
<table class="proprietes"><%-- T:1006 --%>
|
697
|
+
<thead><tr>
|
698
|
+
#{field.uml_isReadOnly? ? "" : "<th> </th>"}
|
699
|
+
<th> </th>
|
700
|
+
}, %{</table>\n}) {
|
701
|
+
field.uml_type_one.struts_formAttribute.each { |a|
|
702
|
+
next if a.uml_name_one=="id"
|
703
|
+
next if a.uml_name_one=="owner"
|
704
|
+
next unless a.uml_type_one.kind_of?(Muml_Enumeration) || a.uml_type_one.kind_of?(Muml_DataType)
|
705
|
+
write(%{<th><b>#{struts_writeMsg("#{a.umlx_owner_one.java_qualifiedName}.#{a.java_Name}")}</b></th>\n})
|
706
|
+
}
|
707
|
+
write %{</tr></thead>\n}
|
708
|
+
|
709
|
+
before=isMany ? %{<logic:iterate id="#{elt}" name="#{owner.java_Name}StrutsForm" property="reference.#{field.java_Name}" >\n} : %{<bean:define id="#{elt}" name="#{owner.java_Name}StrutsForm" property="reference.#{field.java_Name}" />\n}
|
710
|
+
after=isMany ? '</logic:iterate>' : '</bean>'
|
711
|
+
|
712
|
+
struts_encloseWrite(before,after) {
|
713
|
+
write %{<tr>}
|
714
|
+
write %{<td class='action'><a onclick='removeAndDelete#{field.java_NameBean}("<bean:write name="#{elt}" property="id"/>");return false;'/>#{isCompo ? "[D]" : "[R]"}</a></td>\n} unless field.uml_isReadOnly?
|
715
|
+
write %{<td class='action'><a onclick='edit#{field.java_NameBean}("<bean:write name="#{elt}" property="id"/>");return false;'/>[E]</a></td>\n}
|
716
|
+
|
717
|
+
field.uml_type_one.struts_formAttribute.each { |a|
|
718
|
+
next if a.uml_name_one=="id"
|
719
|
+
next if a.uml_name_one=="owner"
|
720
|
+
next unless a.uml_type_one.kind_of?(Muml_Enumeration) || a.uml_type_one.kind_of?(Muml_DataType)
|
721
|
+
if(a.uml_type_one.kind_of?(Muml_Enumeration))
|
722
|
+
write(%{
|
723
|
+
<td class='action'>
|
724
|
+
<%-- enum:TODO localize (use ressource) --%>
|
725
|
+
<bean:write name="#{elt}" property="#{a.java_Name}"/>
|
726
|
+
</td>
|
727
|
+
})
|
728
|
+
else
|
729
|
+
write(%{
|
730
|
+
<td class='action'>
|
731
|
+
<bean:write name="#{elt}" property="#{a.java_Name}"/>
|
732
|
+
</td>
|
733
|
+
})
|
734
|
+
end
|
735
|
+
|
736
|
+
}
|
737
|
+
write %{</tr>\n}
|
738
|
+
}
|
739
|
+
}
|
740
|
+
end
|
741
|
+
|
742
|
+
def struts_edit_writeFieldOne(field,owner)
|
743
|
+
struts_edit_writeFieldGeneric(field,owner,false,false)
|
744
|
+
write %{<logic:empty name="#{owner.java_Name}StrutsForm" property="reference.#{field.java_Name}">\n}
|
745
|
+
struts_edit_writeSelectAndAdd(field,owner)
|
746
|
+
write %{</logic:empty>\n}
|
747
|
+
end
|
748
|
+
end
|
749
|
+
|
750
|
+
|
751
|
+
module Muml_Property
|
752
|
+
|
753
|
+
def writeEnclose(before,after)
|
754
|
+
write before
|
755
|
+
yield
|
756
|
+
write after
|
757
|
+
end
|
758
|
+
|
759
|
+
#writes java code for a property
|
760
|
+
# * labels
|
761
|
+
# * editing zones
|
762
|
+
# * security management
|
763
|
+
# * help zone
|
764
|
+
def struts_edit_writeFieldProp(owner)
|
765
|
+
write(%{<xmdas:SecureZoneTag name="#{owner.java_qualifiedName}.#{java_Name}">\n}) if context[:security]
|
766
|
+
struts_edit_writeFieldPropCode(owner)
|
767
|
+
write(%{</xmdas:SecureZoneTag>\n}) if context[:security]
|
768
|
+
end
|
769
|
+
|
770
|
+
#writes java code for a property
|
771
|
+
# * labels
|
772
|
+
# * editing zones
|
773
|
+
# * help zone
|
774
|
+
def struts_edit_writeFieldPropCode(owner)
|
775
|
+
|
776
|
+
write <<END
|
777
|
+
<div class="row">
|
778
|
+
<span class="label">
|
779
|
+
#{struts_writeMsg("#{owner.java_qualifiedName}.#{java_Name}")}
|
780
|
+
</span>
|
781
|
+
END
|
782
|
+
|
783
|
+
write %{<span class="formw"><table><tr><td>\n\n}
|
784
|
+
struts_edit_writeHelpToggle
|
785
|
+
write %{</td><td>\n\n}
|
786
|
+
#Protected zone for edit area
|
787
|
+
mtk_protected(Mrdf_Resource::NOREVERSE,"edit") {
|
788
|
+
uml_type_one.struts_edit_writeField(self,owner)
|
789
|
+
}
|
790
|
+
write %{</td><td>\n\n}
|
791
|
+
struts_edit_writeValidateErrorMessage
|
792
|
+
write %{</td></tr></table>\n\n}
|
793
|
+
write("</span>\n</div>")
|
794
|
+
|
795
|
+
struts_edit_writeHelpMessage(owner)
|
796
|
+
#write("</div>")
|
797
|
+
|
798
|
+
end
|
799
|
+
|
800
|
+
def struts_edit_writeValidateErrorMessage
|
801
|
+
write %{<html:messages property="#{java_Name}" id="error"><bean:write name="error" /></html:messages>\n}
|
802
|
+
end
|
803
|
+
|
804
|
+
def struts_edit_writeHelpToggle
|
805
|
+
if uml_ownedComment.empty?
|
806
|
+
write %{<img src="#{css_path_model}/#{css_color_class}/image/vide.gif" width="25" height="25" border="0" alt="" />\n}
|
807
|
+
else
|
808
|
+
|
809
|
+
write %{<img src="#{css_path_model}/#{css_color_class}/image/btnHelp.gif" width="25" height="25" border="0" alt="help" onclick='togglehelp("#{java_Name}")' />\n}
|
810
|
+
end
|
811
|
+
|
812
|
+
end
|
813
|
+
|
814
|
+
def struts_edit_writeHelpMessage(owner)
|
815
|
+
write %{
|
816
|
+
<div class="aidelongue" id='aide_#{java_Name}'>
|
817
|
+
<span class="labelHelp">
|
818
|
+
<bean:message key="help.label"/>
|
819
|
+
</span>
|
820
|
+
<span class="contentHelp">
|
821
|
+
#{struts_writeMsg("#{owner.java_qualifiedName}.#{java_Name}.help")}
|
822
|
+
</span>
|
823
|
+
</div>
|
824
|
+
|
825
|
+
}
|
826
|
+
end
|
827
|
+
|
828
|
+
end
|
829
|
+
|
830
|
+
class JavaMappingText < JavaMapping
|
831
|
+
def struts_edit_writeFieldGeneric_DisplayTable_displayTag_column(prop)
|
832
|
+
prop.write %{<display:column property="#{prop.java_Name}" titleKey="#{prop.umlx_owner_one.java_qualifiedName}.#{prop.java_Name}" />\n}
|
833
|
+
end
|
834
|
+
end
|
835
|
+
|
836
|
+
class JavaMappingOrdinal < JavaMappingText
|
837
|
+
def struts_edit_writeFieldGeneric_DisplayTable_displayTag_column(prop)
|
838
|
+
prop.write %{<display:column property="#{prop.java_Name}" titleKey="#{prop.umlx_owner_one.java_qualifiedName}.#{prop.java_Name}" />\n}
|
839
|
+
end
|
840
|
+
end
|
841
|
+
|
842
|
+
class JavaMapping
|
843
|
+
def struts_edit_writeFieldGeneric_DisplayTable_displayTag_column(prop)
|
844
|
+
# One decorator for every type
|
845
|
+
prop.write %{<display:column property="#{prop.java_Name}" titleKey="#{prop.umlx_owner_one.java_qualifiedName}.#{prop.java_Name}" decorator="xmda.displayTag.extensions.I18nColumnDecorator"/>\n}
|
846
|
+
end
|
847
|
+
end
|
848
|
+
|
849
|
+
class JavaMappingCalendar < JavaMapping
|
850
|
+
def struts_edit_writeFieldGeneric_DisplayTable_displayTag_column(prop)
|
851
|
+
#TODO: on ne passe pas ici
|
852
|
+
#Note: Because Calendar and TimeStamp share the same java type (java.util.Date)
|
853
|
+
# the decorator cannot detect which is which.
|
854
|
+
prop.write %{<display:column property="#{prop.java_Name}" titleKey="#{prop.umlx_owner_one.java_qualifiedName}.#{prop.java_Name}" decorator="xmda.displayTag.extensions.I18nCalendarColumnDecorator" />\n}
|
855
|
+
end
|
856
|
+
end
|
857
|
+
class JavaMappingTimeStamp < JavaMapping
|
858
|
+
def struts_edit_writeFieldGeneric_DisplayTable_displayTag_column(prop)
|
859
|
+
#Note: Because Calendar and TimeStamp share the same java type (java.util.Date)
|
860
|
+
# the decorator cannot detect which is which.
|
861
|
+
prop.write %{<display:column property="#{prop.java_Name}" titleKey="#{prop.umlx_owner_one.java_qualifiedName}.#{prop.java_Name}" decorator="xmda.displayTag.extensions.I18nColumnDecorator" />\n}
|
862
|
+
end
|
863
|
+
end
|
864
|
+
|
865
|
+
|
866
|
+
|