[OFBiz] Dev - Entity field validators

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[OFBiz] Dev - Entity field validators

Peter Goron
Hi,

Entity engine defines in its xml schemas that a validation method can be
associated to entity field type and/or to a specific field of an entity.
e.g:
<field-type-def type="id-ne" sql-type="VARCHAR(20)"java-type="String">
  <validate method="isNotEmpty" />
</field-type-def>

I would like to know when validation methods are called because after
having done some tests and checked entity engine source code, it seems
that validation methods are never called.

Do I miss something ?

Peter


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

RE: [OFBiz] Dev - Entity field validators

Robert Riggins
I don't have an answer, but I'm interested in this also. I've watched
for a response to this message and after a couple days without a
response, I thought I'd try to keep this topic alive.

Does anyone have experience with the type of validation Peter mentions
below?

Thanks,
Rob Riggins

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
On Behalf Of Peter Goron
Sent: Friday, September 23, 2005 3:37 AM
To: [hidden email]
Subject: [OFBiz] Dev - Entity field validators

Hi,

Entity engine defines in its xml schemas that a validation method can be
associated to entity field type and/or to a specific field of an entity.
e.g:
<field-type-def type="id-ne" sql-type="VARCHAR(20)"java-type="String">
  <validate method="isNotEmpty" />
</field-type-def>

I would like to know when validation methods are called because after
having done some tests and checked entity engine source code, it seems
that validation methods are never called.

Do I miss something ?

Peter


 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - Entity field validators

David E. Jones

This is one of those questions that I choose not to answer for time  
sake. No offense intended, but there is information about this in the  
Entity Engine Guide (see the Docs & Books page on the ofbiz.org  
site), and the question has been answered on the mailing lists a  
couple of times.

-David


On Sep 26, 2005, at 8:54 AM, Robert Riggins wrote:

> I don't have an answer, but I'm interested in this also. I've watched
> for a response to this message and after a couple days without a
> response, I thought I'd try to keep this topic alive.
>
> Does anyone have experience with the type of validation Peter mentions
> below?
>
> Thanks,
> Rob Riggins
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> On Behalf Of Peter Goron
> Sent: Friday, September 23, 2005 3:37 AM
> To: [hidden email]
> Subject: [OFBiz] Dev - Entity field validators
>
> Hi,
>
> Entity engine defines in its xml schemas that a validation method  
> can be
> associated to entity field type and/or to a specific field of an  
> entity.
> e.g:
> <field-type-def type="id-ne" sql-type="VARCHAR(20)"java-type="String">
>   <validate method="isNotEmpty" />
> </field-type-def>
>
> I would like to know when validation methods are called because after
> having done some tests and checked entity engine source code, it seems
> that validation methods are never called.
>
> Do I miss something ?
>
> Peter
>
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - Entity field validators

Peter Goron
Hi David,

I would like to run field validators in GenericValue setters. Is there
any reason to not do a such thing ?

Peter

Le lundi 26 septembre 2005 à 12:27 -0600, David E. Jones a écrit :

> This is one of those questions that I choose not to answer for time  
> sake. No offense intended, but there is information about this in the  
> Entity Engine Guide (see the Docs & Books page on the ofbiz.org  
> site), and the question has been answered on the mailing lists a  
> couple of times.
>
> -David
>
>
> On Sep 26, 2005, at 8:54 AM, Robert Riggins wrote:
>
> > I don't have an answer, but I'm interested in this also. I've watched
> > for a response to this message and after a couple days without a
> > response, I thought I'd try to keep this topic alive.
> >
> > Does anyone have experience with the type of validation Peter mentions
> > below?
> >
> > Thanks,
> > Rob Riggins
> >
> > -----Original Message-----
> > From: [hidden email] [mailto:[hidden email]]
> > On Behalf Of Peter Goron
> > Sent: Friday, September 23, 2005 3:37 AM
> > To: [hidden email]
> > Subject: [OFBiz] Dev - Entity field validators
> >
> > Hi,
> >
> > Entity engine defines in its xml schemas that a validation method  
> > can be
> > associated to entity field type and/or to a specific field of an  
> > entity.
> > e.g:
> > <field-type-def type="id-ne" sql-type="VARCHAR(20)"java-type="String">
> >   <validate method="isNotEmpty" />
> > </field-type-def>
> >
> > I would like to know when validation methods are called because after
> > having done some tests and checked entity engine source code, it seems
> > that validation methods are never called.
> >
> > Do I miss something ?
> >
> > Peter
> >
> >
> >
> > _______________________________________________
> > Dev mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/dev
> >
> > _______________________________________________
> > Dev mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/dev
> >
>
>  _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Dev - Entity field validators

David E. Jones

Peter,

The main reason is that validation doesn't belong in the data tier.  
In some cases it belongs in the logic tier, where it is to be more  
universally applied, and in some cases it belongs in the UI tier,  
especially when different users and in different circumstances have  
differing validation constraints.

-David


On Sep 26, 2005, at 1:32 PM, Peter Goron wrote:

> Hi David,
>
> I would like to run field validators in GenericValue setters. Is there
> any reason to not do a such thing ?
>
> Peter
>
> Le lundi 26 septembre 2005 à 12:27 -0600, David E. Jones a écrit :
>
>> This is one of those questions that I choose not to answer for time
>> sake. No offense intended, but there is information about this in the
>> Entity Engine Guide (see the Docs & Books page on the ofbiz.org
>> site), and the question has been answered on the mailing lists a
>> couple of times.
>>
>> -David
>>
>>
>> On Sep 26, 2005, at 8:54 AM, Robert Riggins wrote:
>>
>>
>>> I don't have an answer, but I'm interested in this also. I've  
>>> watched
>>> for a response to this message and after a couple days without a
>>> response, I thought I'd try to keep this topic alive.
>>>
>>> Does anyone have experience with the type of validation Peter  
>>> mentions
>>> below?
>>>
>>> Thanks,
>>> Rob Riggins
>>>
>>> -----Original Message-----
>>> From: [hidden email] [mailto:dev-
>>> [hidden email]]
>>> On Behalf Of Peter Goron
>>> Sent: Friday, September 23, 2005 3:37 AM
>>> To: [hidden email]
>>> Subject: [OFBiz] Dev - Entity field validators
>>>
>>> Hi,
>>>
>>> Entity engine defines in its xml schemas that a validation method
>>> can be
>>> associated to entity field type and/or to a specific field of an
>>> entity.
>>> e.g:
>>> <field-type-def type="id-ne" sql-type="VARCHAR(20)"java-
>>> type="String">
>>>   <validate method="isNotEmpty" />
>>> </field-type-def>
>>>
>>> I would like to know when validation methods are called because  
>>> after
>>> having done some tests and checked entity engine source code, it  
>>> seems
>>> that validation methods are never called.
>>>
>>> Do I miss something ?
>>>
>>> Peter
>>>
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [hidden email]
>>> http://lists.ofbiz.org/mailman/listinfo/dev
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [hidden email]
>>> http://lists.ofbiz.org/mailman/listinfo/dev
>>>
>>>
>>
>>  _______________________________________________
>> Dev mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/dev
>>
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev

smime.p7s (3K) Download Attachment