29. Araxis Merge File Comparison Report

Produced by Araxis Merge on Fri Oct 19 14:26:01 2007 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Internet Explorer. For optimum results when printing this report, enable printing of background images and colours in your browser and use landscape orientation.

29.1 Files compared

#FileLocationLast Modified
1display_form.incC:\jahia\template_diff\V2_JAHIA_5_0_2\src\jsp\form_generatorFri Oct 19 14:17:32 2007 UTC
2display_form.incC:\jahia\template_diff\V2_JAHIA_5_0_3\src\jsp\form_generatorFri Oct 19 14:16:51 2007 UTC

29.2 Comparison summary

DescriptionBetween
Files 1 and 2
BlocksLines
Unchanged5557
Changed38
Inserted00
Removed11

29.3 Comparison options

WhitespaceAll differences in whitespace within lines are ignored
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersHidden in comparison detail

29.4 Active regular expressions

No regular expressions were active.

29.5 Comparison detail

1 <%-- 1 <%--
2 Copyright 2002-2006 Jahia Ltd 2 Copyright 2002-2006 Jahia Ltd
3  3 
4 Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (JCDDL),  4 Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (JCDDL),
5 Version 1.0 (the "License"), or (at your option) any later version; you may  5 Version 1.0 (the "License"), or (at your option) any later version; you may
6 not use this file except in compliance with the License. You should have  6 not use this file except in compliance with the License. You should have
7 received a copy of the License along with this program; if not, you may obtain  7 received a copy of the License along with this program; if not, you may obtain
8 a copy of the License at  8 a copy of the License at
9  9 
10  http://www.jahia.org/license/ 10  http://www.jahia.org/license/
11  11 
12 Unless required by applicable law or agreed to in writing, software  12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,  13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and  15 See the License for the specific language governing permissions and
16 limitations under the License. 16 limitations under the License.
17 --%><% 17 --%><%
18 //JahiaContainerList forms = jData.containers().getContainerList( "forms" ); 18 //JahiaContainerList forms = jData.containers().getContainerList( "forms" );
19  19 
20 if (forHasBeenPosted && emptyMandatoryFields.isEmpty()) { 20 if (forHasBeenPosted && emptyMandatoryFields.isEmpty()) {
21     %> 21     %>
22     <%=displayTextAfterPostValue%><br /> 22     <%=displayTextAfterPostValue%><br />
23     <% if (isEditMode) { %> 23     <% if (isEditMode) { %>
24     <a href="<%=jParams.composePageUrl(jParams.getPageID(), jParams.getLocale().toString())%>"> 24     <a href="<%=jParams.composePageUrl(jParams.getPageID(), jParams.getLocale().toString())%>">
25                 -> <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 25                 -> <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
26                     resourceName="back"/> 26                     resourceName="back"/>
27     </a>                 27     </a>               
28     <% } %>      28     <% } %>    
29     <% 29     <%
30 } else {                 30 } else {               
31     if (forms != null) { 31     if (forms != null) {
32         ContainerListBean formsBean = new ContainerListBean(forms,jParams); 32         ContainerListBean formsBean = new ContainerListBean(forms,jParams);
33         formsEnum = forms.getContainers(); 33         formsEnum = forms.getContainers();
34         boolean isFormOK = false; 34         boolean isFormOK = false;
35         int t = 0; 35         int t = 0;
36         final String searchString = (String)request.getParameter("searchString"); 36         final String searchString = (String)request.getParameter("searchString");
37         final boolean searchSubmitted = searchString != null && searchString.length() > 0; 37         final boolean searchSubmitted = searchString != null && searchString.length() > 0;
38                                 if (searchSubmitted) {   38                                 if (searchSubmitted) { 
39                                 final FormGeneratorContainerSearcher textContainerSearcher = new FormGeneratorContainerSearcher("textValues", 39                                 final FormGeneratorContainerSearcher textContainerSearcher = new FormGeneratorContainerSearcher("textValues",
40                                                         jParams, searchString, jParams.getEntryLoadRequest(), "id");     40                                                         jParams, searchString, jParams.getEntryLoadRequest(), "id");   
41                         final FormGeneratorContainerSearcher fileContainerSearcher = new FormGeneratorContainerSearcher("fileValues", 41                         final FormGeneratorContainerSearcher fileContainerSearcher = new FormGeneratorContainerSearcher("fileValues",
42                                                         jParams, searchString, jParams.getEntryLoadRequest(), "id");                                                                             42                                                         jParams, searchString, jParams.getEntryLoadRequest(), "id");                                                                           
43                         String ids = textContainerSearcher.searchContainerIds(searchString, jParams) + " " + 43                         String ids = textContainerSearcher.searchContainerIds(searchString, jParams) + " " +
44                                                                 fileContainerSearcher.searchContainerIds(searchString, jParams);         44                                                                 fileContainerSearcher.searchContainerIds(searchString, jParams);       
45                         if (ids == null ||ids.trim().length() == 0) { 45                         if (ids == null ||ids.trim().length() == 0) {
46                                         ids = String.valueOf(System.currentTimeMillis());        46                                         ids = String.valueOf(System.currentTimeMillis());      
47                         } 47                         }
48                         ContainerSearcher theTextSearcher = new ContainerSearcher("textValues", 48                         ContainerSearcher theTextSearcher = new ContainerSearcher("textValues",
49                                                         jParams, ids, jParams.getEntryLoadRequest());    49                                                         jParams, ids, jParams.getEntryLoadRequest());  
50                         ContainerSearcher theFileSearcher = new ContainerSearcher("fileValues", 50                         ContainerSearcher theFileSearcher = new ContainerSearcher("fileValues",
51                                                         jParams, ids, jParams.getEntryLoadRequest());                                                                                    51                                                         jParams, ids, jParams.getEntryLoadRequest());                                                                                  
52                                 request.setAttribute("textValues_search_handler", theTextSearcher); 52                                 request.setAttribute("textValues_search_handler", theTextSearcher);
53                                 request.setAttribute("fileValues_search_handler", theFileSearcher); 53                                 request.setAttribute("fileValues_search_handler", theFileSearcher);
54                                 } 54                                 }
55  55 
56         while (formsEnum.hasMoreElements()) { 56         while (formsEnum.hasMoreElements()) {
57             t++; 57             t++;
58             JahiaContainer form = (JahiaContainer) formsEnum.nextElement(); 58             JahiaContainer form = (JahiaContainer) formsEnum.nextElement();
59             ContainerBean formBean = new ContainerBean(form,jParams); 59             ContainerBean formBean = new ContainerBean(form,jParams);
60             String sender = form.getFieldValue("sender","Please insert a sender"); 60             String sender = form.getFieldValue("sender","Please insert a sender");
61             String recipients = form.getFieldValue("recipients","Please insert a sender"); 61             String recipients = form.getFieldValue("recipients","Please insert a sender");
62             String recipientsCC = form.getFieldValue("recipientsCC",""); 62             String recipientsCC = form.getFieldValue("recipientsCC","");
63             String subject = form.getFieldValue("subject",""); 63             String subject = form.getFieldValue("subject","");
64             storePostedValues = "true".equals(form.getFieldValue("storePostedValues","false")); 64             storePostedValues = "true".equals(form.getFieldValue("storePostedValues","false"));
65             boolean sendMail = "true".equals(form.getFieldValue("sendMail","false")); 65             boolean sendMail = "true".equals(form.getFieldValue("sendMail","false"));
66             boolean showPostedValues = isEditMode || "true".equals(form.getFieldValue("showPostedValues","false")); 66             boolean showPostedValues = isEditMode || "true".equals(form.getFieldValue("showPostedValues","false"));
67             JahiaPage pageRedirected = (JahiaPage) form.getFieldObject("pageRedirected" ); 67             JahiaPage pageRedirected = (JahiaPage) form.getFieldObject("pageRedirected" );
68             isFormOK = ! ("".equals(sender) || "".equals( recipients )); 68             isFormOK = ! ("".equals(sender) || "".equals( recipients ));
69  69 
70             if (isEditMode) { 70             if (isEditMode) {
71                 %><div class="step1"> 71                 %><div class="step1">
72                 <span class="from"> 72                 <span class="from">
73                     <%if ("".equals(sender)) { %><span style="color:red;"> 73                     <%if ("".equals(sender)) { %><span style="color:red;">
74                         <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 74                         <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
75                     resourceName="form.isMandatory"/> 75                     resourceName="form.isMandatory"/>
76                         </span><%}%> 76                         </span><%}%>
77                     <%=sender%> 77                     <%=sender%>
78                 <% 78                 <%
79                 jData.gui().html().drawBeginActionMenu(formBean , 79                 jData.gui().html().drawBeginActionMenu(formBean ,
80                     null, null, false, "", "jahiatemplates.Corporate_portal_templates_v2", null, out); 80                     null, null, false, "", "jahiatemplates.Corporate_portal_templates_v2", null, out);
81                 %> 81                 %>
82                 </span> 82                 </span>
83                 <span class="to"> 83                 <span class="to">
84                 <%if ("".equals(recipients)) { %><span style="color:red;"> 84                 <%if ("".equals(recipients)) { %><span style="color:red;">
85                         <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 85                         <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
86                     resourceName="form.isMandatory"/> 86                     resourceName="form.isMandatory"/>
87                         </span><%}%><%=recipients%></span> 87                         </span><%}%><%=recipients%></span>
88                 <% 88                 <%
89                 if (! "".equals( recipientsCC )){ 89                 if (! "".equals( recipientsCC )){
90                     %> 90                     %>
91                     <span class="tocc" ><%=recipientsCC%></span> 91                     <span class="tocc" ><%=recipientsCC%></span>
92                     <% 92                     <%
93                 } 93                 }
94                 if (! "".equals( subject )){ 94                 if (! "".equals( subject )){
95  95 
96                     %> 96                     %>
97                     <span class="subject" ><%=subject%></span> 97                     <span class="subject" ><%=subject%></span>
98                     <% 98                     <%
99                 } 99                 }
100                 %> 100                 %>
101                  101                
102                  102                
103                 <% if (sendMail) { %> 103                 <% if (sendMail) { %>
104                                 <span class="mailMessage" > 104                                 <span class="mailMessage" >
105                                 <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 105                                 <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
106                                 resourceName="form.mailWillBeSentIf"/>   106                                 resourceName="form.mailWillBeSentIf"/> 
107                 <% } else { %> 107                 <% } else { %>
108                                 <span class="mailDisabled" > 108                                 <span class="mailDisabled" >
109                                 <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 109                                 <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
110                                 resourceName="form.mailDisabled"/> 110                                 resourceName="form.mailDisabled"/>
111                 <% } %> 111                 <% } %>
112                 </span></div> 112                 </span></div>
113             <% } 113             <% }
114  114 
115             if (isFormOK) { 115             if (isFormOK) {
116                 %><div class="step2"> 116                 %><div class="step2">
117                 <% 117                 <%
118                 if (isEditMode) { 118                 if (isEditMode) {
119                     %><h2><content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 119                     %><h2><content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
120                     resourceName="form.create"/></h2><% 120                     resourceName="form.create"/></h2><%
121                 } 121                 }
122                 JahiaContainerList fields = form.getContainerList( "fields" ); 122                 JahiaContainerList fields = form.getContainerList( "fields" );
123                 if (fields != null) { 123                 if (fields != null) {
124                                 if (fields.getID() == 0) { 124                                 if (fields.getID() == 0) {
125                                                 ServicesRegistry.getInstance().getJahiaContainersService().saveContainerListInfo(fields, jParams.getContentPage().getAclID(), jParams); 125                                                 ServicesRegistry.getInstance().getJahiaContainersService().saveContainerListInfo(fields, jParams.getContentPage().getAclID(), jParams);
126                                                  fields = form.getContainerList( "fields" );              126                                                 // fields = form.getContainerList( "fields" ); wrong recast, object fields is updated (side effect) by previous method saveContainerListInfo
127                                 } 127                                 }
128  128 
129                     Enumeration fieldsEnum = null; 129                     Enumeration fieldsEnum = null;
130  130 
131                     %> 131                     %>
132                     <form method="post" action="<%=bypassUrl%>" accept-charset="UTF-8" 132                     <form method="post" action="<%=bypassUrl%>" accept-charset="UTF-8"
133                             name="submitToContainerList" id="form_<%=form.getID()%>"> 133                             name="submitToContainerList" id="form_<%=form.getID()%>">
134                     <input type="hidden" name="formId" value="<%=form.getID()%>"/> 134                     <input type="hidden" name="formId" value="<%=form.getID()%>"/>
135                     <% 135                     <%
136                     if (forHasBeenPosted && ! emptyMandatoryFields.isEmpty()) { 136                     if (forHasBeenPosted && ! emptyMandatoryFields.isEmpty()) {
137                         %><strong><span style="color:red;"><content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 137                         %><strong><span style="color:red;"><content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
138                     resourceName="form.fieldIsMandatory"/></span></strong><br/><br/><% 138                     resourceName="form.fieldIsMandatory"/></span></strong><br/><br/><%
139                     } 139                     }
140                     %> 140                     %>
141                     <table> 141                     <table>
142                     <% 142                     <%
143  143 
144                     fieldsEnum = fields.getContainers(); 144                     fieldsEnum = fields.getContainers();
145                     while (fieldsEnum.hasMoreElements()) { 145                     while (fieldsEnum.hasMoreElements()) {
146                         JahiaContainer currentField = (JahiaContainer) fieldsEnum.nextElement(); 146                         JahiaContainer currentField = (JahiaContainer) fieldsEnum.nextElement();
147                         ContainerBean currentFieldBean = new ContainerBean(currentField,jParams); 147                         ContainerBean currentFieldBean = new ContainerBean(currentField,jParams);
148                         String fieldTitle = currentField.getFieldValue("fieldTitle",""); 148                         String fieldTitle = currentField.getFieldValue("fieldTitle","");
149                         String isMandatoryStr = currentField.getFieldValue("isMandatory","false"); 149                         String isMandatoryStr = currentField.getFieldValue("isMandatory","false");
150                         boolean isMandatory = "true".equals(isMandatoryStr); 150                         boolean isMandatory = "true".equals(isMandatoryStr);
151                         String type = currentField.getFieldValue("type",""); 151                         String type = currentField.getFieldValue("type","");
152                         String defaultValue = currentField.getFieldValue("defaultValue",""); 152                         String defaultValue = currentField.getFieldValue("defaultValue","");
153                         %> 153                         %>
154                         <tr> 154                         <tr>
155                             <td> 155                             <td>
156                                 <% 156                                 <%
157                                 if (! ResourceBundleMarker.drawMarker(resBundleID,"submitButton","").equals(type)){ 157                                 if (! ResourceBundleMarker.drawMarker(resBundleID,"submitButton","").equals(type)){
158                                     %><strong<% 158                                     %><strong<%
159                                     if (forHasBeenPosted && emptyMandatoryFields.contains(new Integer(currentField.getID()))) { 159                                     if (forHasBeenPosted && emptyMandatoryFields.contains(new Integer(currentField.getID()))) {
160                                         %> style="color:red;"<% 160                                         %> style="color:red;"<%
161                                     } 161                                     }
162                                     %>><%=fieldTitle%> <% 162                                     %>><%=fieldTitle%> <%
163                                     if (isMandatory) { 163                                     if (isMandatory) {
164                                         %> *<% 164                                         %> *<%
165                                     }%>:</strong><% 165                                     }%>:</strong><%
166                                 } 166                                 }
167                                 jData.gui().html().drawBeginActionMenu(currentFieldBean , 167                                 jData.gui().html().drawBeginActionMenu(currentFieldBean ,
168                                     null, null, false, "", 168                                     null, null, false, "",
169                                     "jahiatemplates.Corporate_portal_templates_v2", 169                                     "jahiatemplates.Corporate_portal_templates_v2",
170                                     null, out); 170                                     null, out);
171                                 %> 171                                 %>
172                             </td> 172                             </td>
173                             <td> 173                             <td>
174                                 <% 174                                 <%
175                                 if (ResourceBundleMarker.drawMarker(resBundleID,"smallTextarea","").equals(type)) { 175                                 if (ResourceBundleMarker.drawMarker(resBundleID,"smallTextarea","").equals(type)) {
176                                     if (formIdStr != null) { 176                                     if (formIdStr != null) {
177                                                 final String postedValue; 177                                                 final String postedValue;
178                                                 if (fupload == null) { 178                                                 if (fupload == null) {
179                                                                                                                                 postedValue = request.getParameter("field_" + currentField.getID()); 179                                                                                                                                 postedValue = request.getParameter("field_" + currentField.getID());
180                                                                                                                 } else { 180                                                                                                                 } else {
181                                                                                                                                 postedValue = fupload.getParameterValues("field_" + currentField.getID())[0];    181                                                                                                                                 postedValue = fupload.getParameterValues("field_" + currentField.getID())[0];  
182                                                                                                                 }                        182                                                                                                                 }                      
183                                         if (postedValue != null) { 183                                         if (postedValue != null) {
184                                             logger.debug("Set default value for field [" + fieldTitle + "] to [" + postedValue + "]"); 184                                             logger.debug("Set default value for field [" + fieldTitle + "] to [" + postedValue + "]");
185                                             defaultValue = postedValue; 185                                             defaultValue = postedValue;
186                                         } 186                                         }
187                                     } 187                                     }
188                                     %> 188                                     %>
189                                     <textarea name="field_<%=currentField.getID()%>" 189                                     <textarea name="field_<%=currentField.getID()%>"
190                                         cols="40" rows="6"><%=defaultValue%></textarea> 190                                         cols="40" rows="6"><%=defaultValue%></textarea>
191                                     <% 191                                     <%
192                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"largeTextarea","").equals(type)) { 192                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"largeTextarea","").equals(type)) {
193                                     if (formIdStr != null) { 193                                     if (formIdStr != null) {
194                                         final String postedValue; 194                                         final String postedValue;
195                                                 if (fupload == null) { 195                                                 if (fupload == null) {
196                                                                                                                                 postedValue = request.getParameter("field_" + currentField.getID()); 196                                                                                                                                 postedValue = request.getParameter("field_" + currentField.getID());
197                                                                                                                 } else { 197                                                                                                                 } else {
198                                                                                                                                 postedValue = fupload.getParameterValues("field_" + currentField.getID())[0];    198                                                                                                                                 postedValue = fupload.getParameterValues("field_" + currentField.getID())[0];  
199                                                                                                                 }        199                                                                                                                 }      
200                                         if (postedValue != null) { 200                                         if (postedValue != null) {
201                                             logger.debug("Set default value for field [" + fieldTitle + "] to [" + postedValue + "]"); 201                                             logger.debug("Set default value for field [" + fieldTitle + "] to [" + postedValue + "]");
202                                             defaultValue = postedValue; 202                                             defaultValue = postedValue;
203                                         } 203                                         }
204                                     } 204                                     }
205                                     %> 205                                     %>
206                                     <textarea name="field_<%=currentField.getID()%>" 206                                     <textarea name="field_<%=currentField.getID()%>"
207                                         cols="40" rows="20"><%=defaultValue%></textarea> 207                                         cols="40" rows="20"><%=defaultValue%></textarea>
208                                     <% 208                                     <%
209                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"radioButtons","").equals(type)) { 209                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"radioButtons","").equals(type)) {
210                                     if (! "".equals(defaultValue)) { 210                                     if (! "".equals(defaultValue)) {
211                                         String[] values = defaultValue.split(":"); 211                                         String[] values = defaultValue.split(":");
212                                         final String postedValue; 212                                         final String postedValue;
213                                                 if (fupload == null) { 213                                                 if (fupload == null) {
214                                                                                                                                 postedValue = request.getParameter("field_" + currentField.getID()); 214                                                                                                                                 postedValue = request.getParameter("field_" + currentField.getID());
215                                                                                                                 } else { 215                                                                                                                 } else {
216                                                                                                                                 postedValue = fupload.getParameterValues("field_" + currentField.getID())[0];    216                                                                                                                                 postedValue = fupload.getParameterValues("field_" + currentField.getID())[0];  
217                                                                                                                 }        217                                                                                                                 }      
218                                         for (int x=0; x<values.length; x++) { 218                                         for (int x=0; x<values.length; x++) {
219                                             %> 219                                             %>
220                                             <input type="radio" name="field_<%=currentField.getID()%>" value="<%=values[x]%>" 220                                             <input type="radio" name="field_<%=currentField.getID()%>" value="<%=values[x]%>"
221                                             <% 221                                             <%
222                                             if (postedValue != null){ 222                                             if (postedValue != null){
223                                                 if (values[x].equals(postedValue)) { 223                                                 if (values[x].equals(postedValue)) {
224                                                     %> checked="checked"<% 224                                                     %> checked="checked"<%
225                                                 } 225                                                 }
226                                             } 226                                             }
227                                             %>> <%=values[x]%><br/> 227                                             %>> <%=values[x]%><br/>
228                                             <% 228                                             <%
229                                         } 229                                         }
230                                     } else { 230                                     } else {
231                                         if (isEditMode) { 231                                         if (isEditMode) {
232                                             %><span style="color:red;"><content:resourceBundle 232                                             %><span style="color:red;"><content:resourceBundle
233                                             resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 233                                             resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
234                                             resourceName="form.defaultValueRequired"/></span><% 234                                             resourceName="form.defaultValueRequired"/></span><%
235                                         } 235                                         }
236                                     } 236                                     }
237                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"checkboxes","").equals(type)) { 237                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"checkboxes","").equals(type)) {
238                                     if (! "".equals(defaultValue)) { 238                                     if (! "".equals(defaultValue)) {
239                                         final String[] postedValues; 239                                         final String[] postedValues;
240                                                 if (fupload == null) { 240                                                 if (fupload == null) {
241                                                                                                                                 postedValues = request.getParameterValues("field_" + currentField.getID()); 241                                                                                                                                 postedValues = request.getParameterValues("field_" + currentField.getID());
242                                                                                                                 } else { 242                                                                                                                 } else {
243                                                                                                                                 postedValues = fupload.getParameterValues("field_" + currentField.getID());      243                                                                                                                                 postedValues = fupload.getParameterValues("field_" + currentField.getID());    
244                                                                                                                 }        244                                                                                                                 }      
245                                         Vector postedValuesVector = new Vector(); 245                                         Vector postedValuesVector = new Vector();
246                                         if (postedValues != null) { 246                                         if (postedValues != null) {
247                                             for (int  i = 0; i < postedValues.length; i++){ 247                                             for (int  i = 0; i < postedValues.length; i++){
248                                                 postedValuesVector.add(postedValues[i]); 248                                                 postedValuesVector.add(postedValues[i]);
249                                             } 249                                             }
250                                         } 250                                         }
251                                         String[] values = defaultValue.split(":"); 251                                         String[] values = defaultValue.split(":");
252                                         for (int x=0; x<values.length; x++) { 252                                         for (int x=0; x<values.length; x++) {
253                                             %> 253                                             %>
254                                             <input type="checkbox" name="field_<%=currentField.getID()%>" value="<%=values[x]%>" 254                                             <input type="checkbox" name="field_<%=currentField.getID()%>" value="<%=values[x]%>"
255                                             <% 255                                             <%
256                                             if (postedValuesVector.contains(values[x])){ 256                                             if (postedValuesVector.contains(values[x])){
257                                                 %> checked="checked"<% 257                                                 %> checked="checked"<%
258                                             }%>> <%=values[x]%><br/> 258                                             }%>> <%=values[x]%><br/>
259                                             <% 259                                             <%
260                                         } 260                                         }
261                                     } else { 261                                     } else {
262                                         if (isEditMode) { 262                                         if (isEditMode) {
263                                             %><span style="color:red;"><content:resourceBundle 263                                             %><span style="color:red;"><content:resourceBundle
264                                             resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 264                                             resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
265                                             resourceName="form.defaultValueRequired"/></span><% 265                                             resourceName="form.defaultValueRequired"/></span><%
266                                         } 266                                         }
267                                     } 267                                     }
268                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"selectBox","").equals(type)) { 268                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"selectBox","").equals(type)) {
269                                     if (! "".equals(defaultValue)) { 269                                     if (! "".equals(defaultValue)) {
270                                         %> 270                                         %>
271                                         <select name="field_<%=currentField.getID()%>"> 271                                         <select name="field_<%=currentField.getID()%>">
272                                         <% 272                                         <%
273                                         final String[] postedValues; 273                                         final String[] postedValues;
274                                                 if (fupload == null) { 274                                                 if (fupload == null) {
275                                                                                                                                 postedValues = request.getParameterValues("field_" + currentField.getID()); 275                                                                                                                                 postedValues = request.getParameterValues("field_" + currentField.getID());
276                                                                                                                 } else { 276                                                                                                                 } else {
277                                                                                                                                 postedValues = fupload.getParameterValues("field_" + currentField.getID());      277                                                                                                                                 postedValues = fupload.getParameterValues("field_" + currentField.getID());    
278                                                                                                                 }        278                                                                                                                 }      
279                                         Vector postedValuesVector = new Vector(); 279                                         Vector postedValuesVector = new Vector();
280                                         if (postedValues != null) { 280                                         if (postedValues != null) {
281                                             for (int  i = 0; i < postedValues.length; i++){ 281                                             for (int  i = 0; i < postedValues.length; i++){
282                                                 postedValuesVector.add(postedValues[i]); 282                                                 postedValuesVector.add(postedValues[i]);
283                                             } 283                                             }
284                                         } 284                                         }
285  285 
286                                         String[] values = defaultValue.split(":"); 286                                         String[] values = defaultValue.split(":");
287                                         for (int x=0; x<values.length; x++) { 287                                         for (int x=0; x<values.length; x++) {
288                                             %> 288                                             %>
289                                             <option <% 289                                             <option <%
290                                             if (postedValuesVector.contains(values[x])){ 290                                             if (postedValuesVector.contains(values[x])){
291                                                 %> selected="selected"<% 291                                                 %> selected="selected"<%
292                                             }%>><%=values[x]%></option> 292                                             }%>><%=values[x]%></option>
293                                             <% 293                                             <%
294                                         } 294                                         }
295                                         %> 295                                         %>
296                                         </select> 296                                         </select>
297                                         <% 297                                         <%
298                                     } else { 298                                     } else {
299                                         if (isEditMode) { 299                                         if (isEditMode) {
300                                            %><span style="color:red;"><content:resourceBundle 300                                            %><span style="color:red;"><content:resourceBundle
301                                             resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 301                                             resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
302                                             resourceName="form.defaultValueRequired"/></span><% 302                                             resourceName="form.defaultValueRequired"/></span><%
303                                         } 303                                         }
304                                     } 304                                     }
305  305 
306                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"fileUpload","").equals(type)) {     306                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"fileUpload","").equals(type)) {   
307                                         if (! "".equals(defaultValue)) {   
308                                                 %> 307                                                 %>
309                                                 <script type="text/javascript">                                          308                                                 <script type="text/javascript">                                        
310                                                     document.submitToContainerList.enctype = "multipart/form-data"; 309                                                     document.submitToContainerList.enctype = "multipart/form-data";
311                                                                                                                                         document.submitToContainerList.encoding = "multipart/form-data"; 310                                                                                                                                         document.submitToContainerList.encoding = "multipart/form-data";
312                                                 </script> 311                                                 </script>
313                                                 <input size="80" type="file" name="field_<%=currentField.getID()%>" /> 312                                                 <input size="80" type="file" name="field_<%=currentField.getID()%>" />
314                                     <% 313                                     <%
315                                         }  e ls e  { 314                                                 if (isEditMode && "".equals(defaultValue)) {
316                                                 if (isEditMode) {  
317                                         %><span style="color:red;"><content:resourceBundle 315                                         %><span style="color:red;"><content:resourceBundle
318                                             resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 316                                             resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
319                                             resourceName="form.defaultVa lueRequired"/></span><% 317                                             resourceName="form.defaultPathWillBeUsed"/></span><%
320                                     }  
321                                         } 318                                     }
322  319 
323                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"submitButton","").equals(type)) { 320                                 } else if (ResourceBundleMarker.drawMarker(resBundleID,"submitButton","").equals(type)) {
324                                     %> 321                                     %>
325                                     <input type="submit" name="field_<%=currentField.getID()%>" 322                                     <input type="submit" name="field_<%=currentField.getID()%>"
326                                                 <% if ("".equals(defaultValue)) { %> 323                                                 <% if ("".equals(defaultValue)) { %>
327                                                 value="<content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 324                                                 value="<content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
328                                                                                                                                 resourceName="poll.submit"/>" 325                                                                                                                                 resourceName="poll.submit"/>"
329                                         <% } else { %> 326                                         <% } else { %>
330                                         value="<%=defaultValue%>"/> 327                                         value="<%=defaultValue%>"/>
331                                         <% } %> 328                                         <% } %>
332                                     <% 329                                     <%
333                                 } else { 330                                 } else {
334                                     if (formIdStr != null) { 331                                     if (formIdStr != null) {
335                                         final String postedValue; 332                                         final String postedValue;
336                                                 if (fupload == null) { 333                                                 if (fupload == null) {
337                                                                                                                                 postedValue = request.getParameter("field_" + currentField.getID()); 334                                                                                                                                 postedValue = request.getParameter("field_" + currentField.getID());
338                                                                                                                 } else { 335                                                                                                                 } else {
339                                                                                                                                 postedValue = fupload.getParameterValues("field_" + currentField.getID())[0];    336                                                                                                                                 postedValue = fupload.getParameterValues("field_" + currentField.getID())[0];  
340                                                                                                                 } 337                                                                                                                 }
341                                         if (postedValue != null) { 338                                         if (postedValue != null) {
342                                             logger.debug("Set default value for field [" + fieldTitle + "] to [" + postedValue + "]"); 339                                             logger.debug("Set default value for field [" + fieldTitle + "] to [" + postedValue + "]");
343                                             defaultValue = postedValue; 340                                             defaultValue = postedValue;
344                                         } 341                                         }
345                                     } 342                                     }
346                                     %> 343                                     %>
347                                     <input type="text" name="field_<%=currentField.getID()%>" 344                                     <input type="text" name="field_<%=currentField.getID()%>"
348                                         value="<%=defaultValue%>" size="80"/> 345                                         value="<%=defaultValue%>" size="80"/>
349                                     <% 346                                     <%
350                                 } 347                                 }
351                                 %> 348                                 %>
352                             </td> 349                             </td>
353                         </tr> 350                         </tr>
354                         <% 351                         <%
355                     } 352                     }
356                     %> 353                     %>
357                     </table> 354                     </table>
358                     </form> 355                     </form>
359                     <% 356                     <%
360                      357                    
361                     ContainerListBean fieldsBean = new ContainerListBean(fields,jParams); 358                     ContainerListBean fieldsBean = new ContainerListBean(fields,jParams);
362                                 jData.gui().html().drawBeginActionMenu(fieldsBean , null, 359                                 jData.gui().html().drawBeginActionMenu(fieldsBean , null,
363                                 contextUrl + "/img/actions/note_add.gif", false, "","jahiatemplates.Corporate_portal_templates_v2", 360                                 contextUrl + "/img/actions/note_add.gif", false, "","jahiatemplates.Corporate_portal_templates_v2",
364                                 "add", out); 361                                 "add", out);
365                      362                    
366                     if (showPostedValues) {  363                     if (showPostedValues) {
367                         fieldsEnum = fields.getContainers(); 364                         fieldsEnum = fields.getContainers();
368                                 final Map valuesByRow = new HashMap(); 365                                 final Map valuesByRow = new HashMap();
369                                 final Map idsByRow = new HashMap(); 366                                 final Map idsByRow = new HashMap();
370                                 final List theContainers = new ArrayList(); 367                                 final List theContainers = new ArrayList();
371                         while (fieldsEnum.hasMoreElements()) { 368                         while (fieldsEnum.hasMoreElements()) {
372                                         final JahiaContainer currentField = (JahiaContainer) fieldsEnum.nextElement(); 369                                         final JahiaContainer currentField = (JahiaContainer) fieldsEnum.nextElement();
373                           final String type = currentField.getFieldValue("type",""); 370                           final String type = currentField.getFieldValue("type","");
374                             if (! ResourceBundleMarker.drawMarker(resBundleID,"submitButton","").equals(type)) { 371                             if (! ResourceBundleMarker.drawMarker(resBundleID,"submitButton","").equals(type)) {
375                               theContainers.add(currentField); 372                               theContainers.add(currentField);
376                           } 373                           }
377                            374                          
378                           final JahiaContainerList list; 375                           final JahiaContainerList list;
379                           if (ResourceBundleMarker.drawMarker(resBundleID,"fileUpload","").equals(type)) { 376                           if (ResourceBundleMarker.drawMarker(resBundleID,"fileUpload","").equals(type)) {
380                                         list = currentField.getContainerList("fileValues"); 377                                         list = currentField.getContainerList("fileValues");
381                                 } else { 378                                 } else {
382                                                 list = currentField.getContainerList("textValues"); 379                                                 list = currentField.getContainerList("textValues");
383                                 } 380                                 }
384                           final Enumeration values = list.getContainers();  381                           final Enumeration values = list.getContainers();
385                            382                          
386                           int j = 0; 383                           int j = 0;
387                           while (values.hasMoreElements()) { 384                           while (values.hasMoreElements()) {
388                                   final JahiaContainer c = (JahiaContainer)values.nextElement(); 385                                   final JahiaContainer c = (JahiaContainer)values.nextElement();
389                                         final String key = c.getFieldValue("id"); 386                                         final String key = c.getFieldValue("id");
390                                         List rowValues = (List) valuesByRow.get(key); 387                                         List rowValues = (List) valuesByRow.get(key);
391                                         if (rowValues == null) { 388                                         if (rowValues == null) {
392                                                         rowValues = new ArrayList(fields.size());        389                                                         rowValues = new ArrayList(fields.size());      
393                                         } 390                                         }
394                                         rowValues.add(c); 391                                         rowValues.add(c);
395                                         valuesByRow.put(key, rowValues); 392                                         valuesByRow.put(key, rowValues);
396                                         final Integer ID = new Integer(j); 393                                         final Integer ID = new Integer(j);
397                                         if (! idsByRow.containsKey(ID)) idsByRow.put(ID, key); 394                                         if (! idsByRow.containsKey(ID)) idsByRow.put(ID, key);
398                                         j++; 395                                         j++;
399                             } 396                             }
400                         } 397                         }
401  398 
402                                                                                         request.setAttribute("idsByRow", idsByRow); 399                                                                                         request.setAttribute("idsByRow", idsByRow);
403                         request.setAttribute( "formResultList", new ArrayList(valuesByRow.values())); 400                         request.setAttribute( "formResultList", new ArrayList(valuesByRow.values()));
404                       final org.jahia.utils.displaytag.CaseInsensitiveComparator comparator = 401                       final org.jahia.utils.displaytag.CaseInsensitiveComparator comparator =
405                             new org.jahia.utils.displaytag.CaseInsensitiveComparator(jData.getProcessingContext().getLocale()); 402                             new org.jahia.utils.displaytag.CaseInsensitiveComparator(jData.getProcessingContext().getLocale());
406                          403                        
407                                     %> 404                                     %>
408                         <br/>&nbsp;<br/>                 405                         <br/>&nbsp;<br/>               
409                         <div class="formResultListing">          406                         <div class="formResultListing">        
410                         <% int row = 0; %>       407                         <% int row = 0; %>     
411                         <display:table name="formResultList" class="formResultListing" pagesize="15" id="formResultListID" 408                         <display:table name="formResultList" class="formResultListing" pagesize="15" id="formResultListID"
412                                 requestURI='<%=bypassUrl%>' defaultsort="1" defaultorder="descending" > 409                                 requestURI='<%=bypassUrl%>' defaultsort="1" defaultorder="descending" >
413                                     <% 410                                     <%
414                                 final List rowValues = (List) pageContext.getAttribute("formResultListID"); 411                                 final List rowValues = (List) pageContext.getAttribute("formResultListID");
415                                 final Map map = (Map) request.getAttribute("idsByRow"); 412                                 final Map map = (Map) request.getAttribute("idsByRow");
416                                 final String rowID = (String)map.get(new Integer(row)); 413                                 final String rowID = (String)map.get(new Integer(row));
417                                 final Iterator columns = theContainers.iterator(); 414                                 final Iterator columns = theContainers.iterator();
418                                 int i=0; 415                                 int i=0;
419                                 while (columns.hasNext()) { 416                                 while (columns.hasNext()) {
420                                                                                                                         final JahiaContainer currentField = (JahiaContainer) columns.next();  417                                                                                                                         final JahiaContainer currentField = (JahiaContainer) columns.next();
421                                                                                                                         JahiaContainer currentValue = null; 418                                                                                                                         JahiaContainer currentValue = null;
422                                                                                                                         String theValue = ""; 419                                                                                                                         String theValue = "";
423                                                                                                                         boolean isFile = ResourceBundleMarker.drawMarker(resBundleID,"fileUpload","").equals(currentField.getFieldValue("type","")); 420                                                                                                                         boolean isFile = ResourceBundleMarker.drawMarker(resBundleID,"fileUpload","").equals(currentField.getFieldValue("type",""));
424                                                                                                                         try {  421                                                                                                                         try {
425                                                                                                                                         currentValue = (JahiaContainer) rowValues.get(i);  422                                                                                                                                         currentValue = (JahiaContainer) rowValues.get(i);
426                                                                                                                                         if (isFile) { 423                                                                                                                                         if (isFile) {
427                                                                                                                                                         theValue = currentValue.getFieldValue("fileValue"); 424                                                                                                                                                         theValue = currentValue.getFieldValue("fileValue");
428                                                                                                                                         } else { 425                                                                                                                                         } else {
429                                                                                                                                                         theValue = currentValue.getFieldValue("textValue"); 426                                                                                                                                                         theValue = currentValue.getFieldValue("textValue");
430                                                                                                                                         } 427                                                                                                                                         }
431                                                         if (theValue == null) { 428                                                         if (theValue == null) {
432                                                                         theValue = ""; 429                                                                         theValue = "";
433                                         } 430                                         }
434                                                                                                                                          431                                                                                                                                        
435                                                                                                                                         if (isFile) { 432                                                                                                                                         if (isFile) {
436                                                                                                                                                         JahiaFileField file = (JahiaFileField) currentValue.getFieldObject("fileValue"); 433                                                                                                                                                         JahiaFileField file = (JahiaFileField) currentValue.getFieldObject("fileValue");
437                                                                                                                                 String fileName = "null"; 434                                                                                                                                 String fileName = "null";
438                                                                                                                                 String downloadUrl = "#"; 435                                                                                                                                 String downloadUrl = "#";
439                                                                                                                                 String picto = "file"; 436                                                                                                                                 String picto = "file";
440                                                                                                                                 if (file != null ) {  437                                                                                                                                 if (file != null ) {
441                                                                                                                                 downloadUrl = file.getDownloadUrl(); 438                                                                                                                                 downloadUrl = file.getDownloadUrl();
442                                                                                                                                 fileName = file.getFileFieldTitle(); 439                                                                                                                                 fileName = file.getFileFieldTitle();
443                                                                                                                                 if (fileName.equals("")){ 440                                                                                                                                 if (fileName.equals("")){
444                                                                                                                                         fileName = file.getRealName(); 441                                                                                                                                         fileName = file.getRealName();
445                                                                                                                                 } 442                                                                                                                                 }
446                                                                                                                                 picto = getPicto(file.getRealName()); 443                                                                                                                                 picto = getPicto(file.getRealName());
447                                                                                                                                 } 444                                                                                                                                 }
448                                                                                                                                 if (fileName.equals("null") || fileName == null || fileName.length() == 0) { 445                                                                                                                                 if (fileName.equals("null") || fileName == null || fileName.length() == 0) {
449                                                                                                                                                 theValue = "&nbsp;";             446                                                                                                                                                 theValue = "&nbsp;";           
450                                                                                                                                 } else { 447                                                                                                                                 } else {
451                                                                                                                                                                         final StringBuffer buff = new StringBuffer();    448                                                                                                                                                                         final StringBuffer buff = new StringBuffer();  
452                                                                                                                                                                         buff.append("<a class=\""); 449                                                                                                                                                                         buff.append("<a class=\"");
453                                                                                                                                                                         buff.append(picto); 450                                                                                                                                                                         buff.append(picto);
454                                                                                                                                                                         buff.append("\" href=\""); 451                                                                                                                                                                         buff.append("\" href=\"");
455                                                                                                                                                                         buff.append(downloadUrl); 452                                                                                                                                                                         buff.append(downloadUrl);
456                                                                                                                                                                         buff.append("\" title=\""); 453                                                                                                                                                                         buff.append("\" title=\"");
457                                                                                                                                                                         buff.append(fileName); 454                                                                                                                                                                         buff.append(fileName);
458                                                                                                                                                                         buff.append("\">"); 455                                                                                                                                                                         buff.append("\">");
459                                                                                                                                                                         buff.append(fileName); 456                                                                                                                                                                         buff.append(fileName);
460                                                                                                                                                                         buff.append("</a>");     457                                                                                                                                                                         buff.append("</a>");   
461                                                                                                                                                                         theValue = buff.toString(); 458                                                                                                                                                                         theValue = buff.toString();
462                                                                                                                                                         } 459                                                                                                                                                         }
463                                                 } 460                                                 }
464                                                                                                                         } catch (Exception e) { 461                                                                                                                         } catch (Exception e) {
465                         } 462                         }
466                          463                        
467                         %> 464                         %>
468                                 <% if (i == 0) {  465                                 <% if (i == 0) {
469                                         %> 466                                         %>
470                                 <display:column title="<%=creationDateTitle%>" sortable="true" comparator="<%= comparator %>" > 467                                 <display:column title="<%=creationDateTitle%>" sortable="true" comparator="<%= comparator %>" >
471                                                 <%=currentValue.getContentContainer().getMetadataDateValue("creationDate", jParams, "-", sdf) %> 468                                                 <%=currentValue.getContentContainer().getMetadataDateValue("creationDate", jParams, "-", sdf) %>
472                                                  469                                                
473                                                 <% if (isEditMode) { %> 470                                                 <% if (isEditMode) { %>
474                                                 <a href="javascript:<%=jData.gui().html().drawDeleteContainerLauncher(currentValue)%>"> 471                                                 <a href="javascript:<%=jData.gui().html().drawDeleteContainerLauncher(currentValue)%>">
475                                                                                                                                 <img border="0" alt="delete row" src="<%=contextURL%>/img/actions/delete.gif" /> 472                                                                                                                                 <img border="0" alt="delete row" src="<%=contextURL%>/img/actions/delete.gif" />
476                                                                                                                         </a>             473                                                                                                                         </a>           
477                                                                                                                         <% } %>  474                                                                                                                         <% } %>
478                                 </display:column>        475                                 </display:column>      
479                                 <% } %> 476                                 <% } %>
480                                  477                                
481                                 <display:column title="<%=currentField.getFieldValue("fieldTitle","")%>" sortable="true" comparator="<%= comparator %>" > 478                                 <display:column title="<%=currentField.getFieldValue("fieldTitle","")%>" sortable="true" comparator="<%= comparator %>" >
482                                 <%=theValue%> 479                                 <%=theValue%>
483                                 <%  480                                 <%
484                                                 if (currentValue == null || currentValue.getID() < 1 || "".equals(currentValue.getFieldValue("id",""))) { 481                                                 if (currentValue == null || currentValue.getID() < 1 || "".equals(currentValue.getFieldValue("id",""))) {
485                                         final JahiaContainerList theList; 482                                         final JahiaContainerList theList;
486                                         final JahiaContainerDefinition def; 483                                         final JahiaContainerDefinition def;
487                                   if (isFile) { 484                                   if (isFile) {
488                                                 theList = currentField.getContainerList("fileValues"); 485                                                 theList = currentField.getContainerList("fileValues");
489                                                 def = JahiaContainerDefinitionsRegistry. 486                                                 def = JahiaContainerDefinitionsRegistry.
490                                                                                                                                                         getInstance().getDefinition(jParams.getSiteID(), "fileValues"); 487                                                                                                                                                         getInstance().getDefinition(jParams.getSiteID(), "fileValues");
491                                         } else { 488                                         } else {
492                                                         theList = currentField.getContainerList("textValues"); 489                                                         theList = currentField.getContainerList("textValues");
493                                                         def = JahiaContainerDefinitionsRegistry. 490                                                         def = JahiaContainerDefinitionsRegistry.
494                                                                                                                                                         getInstance().getDefinition(jParams.getSiteID(), "textValues"); 491                                                                                                                                                         getInstance().getDefinition(jParams.getSiteID(), "textValues");
495                                         } 492                                         }
496  493 
497                                         currentValue = new JahiaContainer(0, 494                                         currentValue = new JahiaContainer(0,
498                                                                                                                                                         jParams.getJahiaID(), 495                                                                                                                                                         jParams.getJahiaID(),
499                                                                                                                                                         jParams.getPageID(), 496                                                                                                                                                         jParams.getPageID(),
500                                                                                                                                                         theList.getID(), 497                                                                                                                                                         theList.getID(),
501                                                                                                                                                         0, 498                                                                                                                                                         0,
502                                                                                                                                                         0, 499                                                                                                                                                         0,
503                                                                                                                                                         def.getID(), 500                                                                                                                                                         def.getID(),
504                                                                                                                                                         0, 501                                                                                                                                                         0,
505                                                                                                                                                         EntryLoadRequest.STAGING_WORKFLOW_STATE);    502                                                                                                                                                         EntryLoadRequest.STAGING_WORKFLOW_STATE);  
506                                                                                                                                                          503                                                                                                                                                        
507                                                                                         ServicesRegistry.getInstance().getJahiaContainersService().saveContainer(currentValue, 0, jParams); 504                                                                                         ServicesRegistry.getInstance().getJahiaContainersService().saveContainer(currentValue, 0, jParams);
508                                         currentValue = ServicesRegistry.getInstance().getJahiaContainersService().loadContainer( 505                                         currentValue = ServicesRegistry.getInstance().getJahiaContainersService().loadContainer(
509                                                                                                                         currentValue.getID(), LoadFlags.ALL, jParams, EntryLoadRequest.STAGED);  506                                                                                                                         currentValue.getID(), LoadFlags.ALL, jParams, EntryLoadRequest.STAGED);
510                                                                                         currentValue.setLanguageCode(jParams.getLocale().toString()); 507                                                                                         currentValue.setLanguageCode(jParams.getLocale().toString());
511                                                                                                 currentValue.fieldsStructureCheck(jParams);                              508                                                                                                 currentValue.fieldsStructureCheck(jParams);                            
512                                                                                         JahiaField field = currentValue.getField("id");                  509                                                                                         JahiaField field = currentValue.getField("id");                
513                                                                                         field.setValue(rowID);    510                                                                                         field.setValue(rowID);  
514                                                                                         field.save(jParams);                                   511                                                                                         field.save(jParams);                                 
515                               } 512                               }
516                                                                                                                         %> 513                                                                                                                         %>
517                                                                                                                         <% if (isEditMode) { %> 514                                                                                                                         <% if (isEditMode) { %>
518                                                                                                                         <a href="javascript:<%=jData.gui().html().drawUpdateContainerLauncher(currentValue)%>"> 515                                                                                                                         <a href="javascript:<%=jData.gui().html().drawUpdateContainerLauncher(currentValue)%>">
519                                                                                                                                 <img border="0" alt="update" src="<%=contextURL%>/img/actions/update.gif" /> 516                                                                                                                                 <img border="0" alt="update" src="<%=contextURL%>/img/actions/update.gif" />
520                                                                                                                         </a> 517                                                                                                                         </a>
521                                                                                                                         <% } %> 518                                                                                                                         <% } %>
522                                                                                                                          519                                                                                                                        
523                                                                                                                         <% 520                                                                                                                         <%
524                                   %>     521                                   %>   
525                                 </display:column> 522                                 </display:column>
526                         <% i++; %> 523                         <% i++; %>
527                         <% } %>  524                         <% } %>
528                         <% row++; %> 525                         <% row++; %>
529                       </display:table>  526                       </display:table>
530                       <% if (valuesByRow.values().size() > 0 || searchSubmitted) { %>            527                       <% if (valuesByRow.values().size() > 0 || searchSubmitted) { %>          
531                         <form method="post" action="<%=bypassUrl%>" name="search" > 528                         <form method="post" action="<%=bypassUrl%>" name="search" >
532                                         <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 529                                         <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
533                                                                 resourceName="search"/>: <input type="text" name="searchString"/> 530                                                                 resourceName="search"/>: <input type="text" name="searchString"/>
534                                                                                                         <input type="submit" name="submitbutton" value="<content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 531                                                                                                         <input type="submit" name="submitbutton" value="<content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
535                                                                 resourceName="poll.submit"/>"/> 532                                                                 resourceName="poll.submit"/>"/>
536                         </form> 533                         </form>
537                         <% } %>  534                         <% } %>
538                       </div>     535                       </div>   
539                         <% 536                         <%
540                     } 537                     }
541                 } 538                 }
542                 %></div><% 539                 %></div><%
543             } 540             }
544         } 541         }
545         if (t == 0) { 542         if (t == 0) {
546             if (! formsEnum.hasMoreElements()) { 543             if (! formsEnum.hasMoreElements()) {
547                 final String launcher = jData.gui().html().drawAddContainerLauncher( forms ); 544                 final String launcher = jData.gui().html().drawAddContainerLauncher( forms );
548                     if ( ! "".equals(launcher) ) { 545                     if ( ! "".equals(launcher) ) {
549                         %> 546                         %>
550                         <div class="step1"> 547                         <div class="step1">
551                         <a href="javascript:<%=launcher%>"> 548                         <a href="javascript:<%=launcher%>">
552                         <img src='<content:contextURL/>/img/actions/add.gif' alt='Add form' width='11' height='11' border='0'/> 549                         <img src='<content:contextURL/>/img/actions/add.gif' alt='Add form' width='11' height='11' border='0'/>
553                         <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2" 550                         <content:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates_v2"
554                         resourceName="form.addSender"/></a> 551                         resourceName="form.addSender"/></a>
555                     </div> 552                     </div>
556                         <% 553                         <%
557                     } 554                     }
558             } 555             }
559         } 556         }
560     } 557     }
561 } 558 }
562  559 
563 %> 560 %>