You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2020/02/20 13:51:05 UTC
[ofbiz-framework] 01/04: Fixed: Correct FoFormMacro to support form
list with non separate fields (OFBIZ-11335)
This is an automated email from the ASF dual-hosted git repository.
nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
commit d8641bce8c1d33703b85ca7366915e4ae0033fe2
Author: Nicolas Malin <ni...@nereide.fr>
AuthorDate: Thu Feb 20 14:13:57 2020 +0100
Fixed: Correct FoFormMacro to support form list with non separate fields
(OFBIZ-11335)
Related to issue OFBIZ-11335 when a form list haven't the attribute separate-column to true,
the screen engine failed to rendering it through screen-fop due to a block present on table-row without table-cell.
We have in log some line like :
ScreenFopViewHandler |E| Unable to transform FO file: org.apache.fop.apps.FOPException: javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: null:150:2: "fo:block" is not a valid child of "fo:table-row"!
Simple fix is to open and close a table-cell when renderFormatHeaderRowFormCell[Open/Close] and renderFormatItemRowFormCell[Open/Close] are called.
---
themes/common-theme/template/macro/FoFormMacroLibrary.ftl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/themes/common-theme/template/macro/FoFormMacroLibrary.ftl b/themes/common-theme/template/macro/FoFormMacroLibrary.ftl
index c99efc9..948203f 100644
--- a/themes/common-theme/template/macro/FoFormMacroLibrary.ftl
+++ b/themes/common-theme/template/macro/FoFormMacroLibrary.ftl
@@ -98,16 +98,16 @@ under the License.
<#macro renderFormatHeaderRowCellOpen style="" positionSpan=""><fo:table-cell <#if positionSpan?has_content && positionSpan gt 1 >number-columns-spanned="${positionSpan}"</#if><#if style?has_content><@getFoStyle "${style}"/><#else><@getFoStyle "listtitlestyle"/></#if>><fo:block></#macro>
<#macro renderFormatHeaderRowCellClose></fo:block></fo:table-cell></#macro>
-<#macro renderFormatHeaderRowFormCellOpen style></#macro>
-<#macro renderFormatHeaderRowFormCellClose></#macro>
+<#macro renderFormatHeaderRowFormCellOpen style><fo:table-cell></#macro>
+<#macro renderFormatHeaderRowFormCellClose></fo:table-cell></#macro>
<#macro renderFormatHeaderRowFormCellTitleSeparator style isLast></#macro>
<#macro renderFormatItemRowOpen formName itemIndex altRowStyles evenRowStyle oddRowStyle><fo:table-row <@getFoStyle "${altRowStyles}"/>></#macro>
<#macro renderFormatItemRowClose formName></fo:table-row></#macro>
<#macro renderFormatItemRowCellOpen fieldName style="" positionSpan=""><fo:table-cell <#if positionSpan?has_content && positionSpan gt 1 >number-columns-spanned="${positionSpan}"</#if><#if style?has_content><@getFoStyle style/><#else><@getFoStyle "tabletext"/></#if>><fo:block></#macro>
<#macro renderFormatItemRowCellClose fieldName></fo:block></fo:table-cell></#macro>
-<#macro renderFormatItemRowFormCellOpen style></#macro>
-<#macro renderFormatItemRowFormCellClose></#macro>
+<#macro renderFormatItemRowFormCellOpen style><fo:table-cell></#macro>
+<#macro renderFormatItemRowFormCellClose></fo:table-cell></#macro>
<#macro renderFormatSingleWrapperOpen formName style><fo:table><fo:table-column column-width="1.75in"/><fo:table-column column-width="1.75in"/><fo:table-column column-width="1.75in"/><fo:table-column column-width="1.75in"/><fo:table-body></#macro>
<#macro renderFormatSingleWrapperClose formName></fo:table-body></fo:table></#macro>