Hello,
After review some issue related to https://issues.apache.org/jira/browse/OFBIZ-7471, my head raise an old idea that have been in the past to improve error message on service validation. Currently to set an error message related to an attribute, we need to set it like this :
        <attribute name="file" type="String" mode="IN" optional="false">
            <type-validate>
<fail-property resource="ContentErrorUiLabels" property="ContentRequiredFieldMissingFile"/>
            </type-validate>
        </attribute>
I find this burden, to write and to read.

Maybe we can improve OFBiz to resolve le label automatically with few easy rule like : write title error label with the template ServiceErrorTitle_${serviceName}_${attribute}, if not found resolve the generic ServiceErrorTitle_${serviceName}, if not found resolve ServiceErrorTitle_${attribute}
All service label files would be identify to load in cache at ofbiz start.
I think it's :
* easy to develop
* easy to maintain
* don't decrease the performance

Opinions ?

Nicolas

--
logoNrd <https://nereide.fr/>
        Nicolas Malin
The apache way <http://theapacheway.com/> : *Openness* Technical decisions are made publicly
[email protected]
8 rue des Déportés 37000 TOURS, 02 47 50 30 54

Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way <http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE <http://www.libre-entreprise.org/>

Reply via email to