Hi Nicholas,
Are you proposing these labels would be used when there's a missing
parameter to a service? If that's right, the names of labels should
communicate they are about missing parameters.
How about ServiceErrorTitle_${serviceName}_Missing_${attribute} and
ServiceErrorTitle_Missing_${attribute}
. I don't understand when ServiceErrorTitle_${serviceName} would be used.
Cheers
Paul Foxworthy
On 23 July 2017 at 04:26, Nicolas Malin <[email protected]> wrote:
> 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/>
>
--
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Australia
Phone: +61 3 9585 6788
Web: http://www.coherentsoftware.com.au/
Email: [email protected]