Files
ofbiz-framework/framework/webtools/webapp/webtools/includes/messages.ftl
T
Jacopo Cappellato 23ee5d29ea License change from MIT to ASL2.0 for the files of the webtools component.
Thanks to Scott Gray for the patch (Apache OFBIZ-87).

git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@423821 13f79535-47bb-0310-9956-ffa450edef68
2006-07-20 08:22:12 +00:00

75 lines
2.9 KiB
Plaintext

<#--
Copyright 2001-2006 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
-->
<#if requestAttributes.errorMessageList?has_content><#assign errorMessageList=requestAttributes.errorMessageList></#if>
<#if requestAttributes.eventMessageList?has_content><#assign eventMessageList=requestAttributes.eventMessageList></#if>
<#if requestAttributes.serviceValidationException?exists><#assign serviceValidationException = requestAttributes.serviceValidationException></#if>
<#-- special error message override -->
<#if serviceValidationException?exists>
<#assign serviceName = serviceValidationException.getServiceName()?if_exists>
<#assign missingList = serviceValidationException.getMissingFields()?if_exists>
<#assign extraList = serviceValidationException.getExtraFields()?if_exists>
<#-- need if statement for EACH service (see the controller.xml file for service names) -->
<#if serviceName?has_content && serviceName == "createPartyContactMechPurpose">
<#-- create the inital message prefix -->
<#assign message = "The following required fields where found empty:">
<#-- loop through all the missing fields -->
<#list missingList as missing>
<#--
check for EACH required field (see the service definition)
then append a message for the missing field; some fields may be
and not needed; this example show ALL fields for the service.
** The value inside quotes must match 100% case included.
-->
<#if missing == "partyId">
<#assign message = message + "<li>Party ID</li>">
</#if>
<#if missing == "contactMechId">
<#assign message = message + "<li>ContactMech ID</li>">
</#if>
<#if missing == "contactMechPurposeTypeId">
<#assign message = message + "<li>Contact Purpose</li>">
</#if>
</#list>
<#-- this will replace the current error message with the new one -->
<#assign errorMsgReq = message>
</#if>
</#if>
<#-- display the error messages -->
<#if errorMessageList?has_content>
<div class="errorMessage">The following errors occurred:</div><br/>
<ul>
<#list errorMessageList as errorMsg>
<li class="errorMessage">${errorMsg}</li>
</#list>
</ul>
<br/>
</#if>
<#if eventMessageList?has_content>
<div class="eventMessage">The following occurred:</div><br/>
<ul>
<#list eventMessageList as eventMsg>
<li class="eventMessage">${eventMsg}</li>
</#list>
</ul>
<br/>
</#if>