|
|
|
@ -138,8 +138,18 @@ if (ddmTemplateId > 0) {
|
|
|
|
|
requestedLocale="<%= LocaleUtil.fromLanguageId(languageId) %>" |
|
|
|
|
/> |
|
|
|
|
</liferay-util:buffer> |
|
|
|
|
<% salva("prima.txt", html); %> |
|
|
|
|
<%= normalize(html, parameters, fieldNameOptions, renderResponse, prefix, suffix) %> |
|
|
|
|
<% salva("inizio.html", html); %> |
|
|
|
|
<%= |
|
|
|
|
normalize(html, parameters, fieldNameOptions, renderResponse, prefix, suffix) |
|
|
|
|
Log _log = LogFactoryUtil.getLog("render_form_task_jsp_salva"); |
|
|
|
|
for (Map.Entry<String, List<Map<String, Serializable>>> entry : fieldNameOptions.entrySet()) { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
/* html.replaceAll( |
|
|
|
|
"\\sname=\"" + renderResponse.getNamespace() + "(.*?)_INSTANCE_[^\"]*", |
|
|
|
|
" name=\"" + prefix + "$1" + suffix |
|
|
|
|
)*/ |
|
|
|
|
%> |
|
|
|
|
|
|
|
|
|
<%! |
|
|
|
|
private String normalize(String html, Map<String, Serializable> parameters, |
|
|
|
@ -149,9 +159,9 @@ private String normalize(String html, Map<String, Serializable> parameters,
|
|
|
|
|
if (Validator.isNull(html)) { |
|
|
|
|
return StringPool.BLANK; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// replace portlet namespace + random namespace |
|
|
|
|
html = html.replaceAll("name=\"" + renderResponse.getNamespace(), "name=\""); |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
Parser parser = Parser.createParser(html, StringPool.UTF8); |
|
|
|
@ -162,16 +172,13 @@ private String normalize(String html, Map<String, Serializable> parameters,
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
html = nodeList.toHtml(); |
|
|
|
|
|
|
|
|
|
} catch (ParserException e) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// add prefix + suffix |
|
|
|
|
html = html.replaceAll("name=\"(.*?)\"", "name=\"" + prefix + "$1" + suffix + "\""); |
|
|
|
|
|
|
|
|
|
// ignore ddm fields display |
|
|
|
|
html = html.replaceAll("name=\"" + prefix + "_fieldsDisplay" + suffix, "name=\"_fieldsDisplay\""); |
|
|
|
|
salva("dopo.txt", html); |
|
|
|
|
html = html.replaceAll("name=\"" + prefix + "_fieldsDisplay" + suffix + "\"", "name=\"_fieldsDisplay\""); |
|
|
|
|
return html; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|