diff --git a/framework/widget/dtd/widget-form.xsd b/framework/widget/dtd/widget-form.xsd index f1457f4e80..f67647f8e8 100644 --- a/framework/widget/dtd/widget-form.xsd +++ b/framework/widget/dtd/widget-form.xsd @@ -1527,6 +1527,14 @@ under the License. + + + + + + + + diff --git a/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java b/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java index b1dc11cb78..bf10c3a484 100644 --- a/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java +++ b/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java @@ -2020,7 +2020,7 @@ public class MacroFormRenderer implements FormStringRenderer { int viewIndex = modelForm.getViewIndex(context); int viewSize = modelForm.getViewSize(context); int listSize = modelForm.getListSize(context); - + int lowIndex = modelForm.getLowIndex(context); int highIndex = modelForm.getHighIndex(context); int actualPageSize = modelForm.getActualPageSize(context); diff --git a/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java b/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java index 1ba890400d..56a2ad68da 100644 --- a/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java +++ b/framework/widget/src/org/ofbiz/widget/form/ModelFormAction.java @@ -304,6 +304,7 @@ public abstract class ModelFormAction { protected FlexibleStringExpander autoFieldMapExdr; protected FlexibleStringExpander resultMapListNameExdr; protected Map, Object> fieldMap; + protected boolean ignoreError = false; public Service(ModelForm modelForm, Element serviceElement) { super (modelForm, serviceElement); @@ -329,6 +330,7 @@ public abstract class ModelFormAction { } this.fieldMap = EntityFinderUtil.makeFieldMap(serviceElement); + this.ignoreError = "true".equals(serviceElement.getAttribute("ignore-error")); } @Override @@ -383,7 +385,9 @@ public abstract class ModelFormAction { } catch (GenericServiceException e) { String errMsg = "Error in form [" + this.modelForm.getName() + "] calling service with name [" + serviceNameExpanded + "]: " + e.toString(); Debug.logError(e, errMsg, module); - throw new IllegalArgumentException(errMsg); + if (!this.ignoreError) { + throw new IllegalArgumentException(errMsg); + } } } } diff --git a/framework/widget/templates/htmlFormMacroLibrary.ftl b/framework/widget/templates/htmlFormMacroLibrary.ftl index 136b133beb..2445769233 100644 --- a/framework/widget/templates/htmlFormMacroLibrary.ftl +++ b/framework/widget/templates/htmlFormMacroLibrary.ftl @@ -245,7 +245,7 @@ ${item.description} #macro> <#macro renderFormatHeaderRowFormCellTitleSeparator style isLast> -<#if style?has_content>#if> - <#if style?has_content>#if> +<#if style?has_content>#if> - <#if style?has_content>#if> #macro> <#macro renderFormatItemRowOpen formName itemIndex altRowStyles evenRowStyle oddRowStyle> @@ -429,6 +429,7 @@ ${item.description} <#t/> #if> #macro> + <#macro renderNextPrev paginateStyle paginateFirstStyle viewIndex highIndex listSize viewSize ajaxEnabled javaScriptEnabled ajaxFirstUrl firstUrl paginateFirstLabel paginatePreviousStyle ajaxPreviousUrl previousUrl paginatePreviousLabel pageLabel ajaxSelectUrl selectUrl ajaxSelectSizeUrl selectSizeUrl commonDisplaying paginateNextStyle ajaxNextUrl nextUrl paginateNextLabel paginateLastStyle ajaxLastUrl lastUrl paginateLastLabel paginateViewSizeLabel> <#if listSize gt viewSize> @@ -453,9 +454,11 @@ ${item.description} #if> #macro> + <#macro renderFileField className alert name value size maxlength autocomplete><#if name?has_content> name="${name}"#if><#if value?has_content> value="${value}"#if><#if size?has_content> size="${size}"#if><#if maxlength?has_content> maxlength="${maxlength}"#if><#if autocomplete?has_content> autocomplete="off"#if>/><#rt/>#macro> <#macro renderPasswordField className alert name value size maxlength id autocomplete><#if name?has_content> name="${name}"#if><#if value?has_content> value="${value}"#if><#if size?has_content> size="${size}"#if><#if maxlength?has_content> maxlength="${maxlength}"#if><#if id?has_content> id="${id}"#if><#if autocomplete?has_content> autocomplete="off"#if>/>#macro> <#macro renderImageField value border width height event action> src="${value}"#if><#if border?has_content> border="${border}"#if><#if width?has_content> width="${width}"#if><#if height?has_content> height="${height}"#if><#if event?has_content> ${rp.event?html}="${action}" #if>/>#macro> + <#macro renderBanner style leftStyle rightStyle leftText text rightText> <#rt/> <#if leftText?has_content><#if leftStyle?has_content>#if>${leftText}<#if leftStyle?has_content>#if><#rt/>#if> @@ -463,6 +466,7 @@ ${item.description} <#if rightText?has_content><#if rightStyle?has_content>#if>${rightText}<#if rightStyle?has_content>#if><#rt/>#if> #macro> + <#macro renderContainerField id>#macro> <#macro renderFieldGroupOpen style id title collapsed collapsibleAreaId collapsible expandToolTip collapseToolTip> @@ -476,6 +480,7 @@ ${item.description} style="display: none;"#if>> #if> #macro> + <#macro renderFieldGroupClose style id title><#if style?has_content || id?has_content || title?has_content>#if>#macro> <#macro renderHyperlinkTitle name title showSelectAll="N"><#if title?has_content>${title}#if><#if showSelectAll="Y">#if>#macro> @@ -483,12 +488,15 @@ ${item.description} <#macro formatBoundaryComment boundaryType widgetType widgetName>#macro> <#macro renderTooltip tooltip tooltipStyle><#if tooltip?has_content>${tooltip}<#rt/>#if>#macro> + <#macro renderClass className="" alert=""> <#if className?has_content || (alert?has_content && alert=="true")> class="${className}<#if alert?has_content && alert=="true"> alert#if>" #if> #macro> + <#macro renderAsterisks requiredField requiredStyle> <#if requiredField=="true"><#if !requiredStyle?has_content>*#if>#if> #macro> + <#macro makeHiddenFormLinkForm actionUrl name parameters targetWindow>target="${targetWindow}"#if> onsubmit="javascript:submitFormDisableSubmits(this)" name="${name}"><#list parameters as parameter>#list>#macro> <#macro makeHiddenFormLinkAnchor linkStyle hiddenFormName event action imgSrc description confirmation>class="${linkStyle}"#if> href="javascript:document.${hiddenFormName}.submit()"<#if action?has_content && event?has_content> ${event}="${action}"#if><#if confirmation?has_content> onclick="return confirm('${confirmation}')"#if>><#if imgSrc?has_content>#if>${description}#macro> <#macro makeHyperlinkString linkStyle hiddenFormName event action imgSrc linkUrl targetWindow description confirmation>class="${linkStyle}"#if> href="${linkUrl}"<#if targetWindow?has_content> target="${targetWindow}"#if><#if action?has_content && event?has_content> ${event}="${action}"#if><#if confirmation?has_content> onclick="return confirm('${confirmation}')"#if>><#if imgSrc?has_content>#if>${description}#macro>