Validation

Posts   
 
    
ds
User
Posts: 2
Joined: 27-Mar-2005
# Posted on: 27-Mar-2005 10:39:49   

Hello, i am new with llblgen and i tryed the validate functions. i expierenced some problems with it: - in the fieldvalidate i can return false and in an attached datagrid the change is undone - thats fine, but i found no way to pass an information back WHY this was done (error or information message). as well it would be nice to have access to the whole entity when a field change for the entity validator i found no way to register it on a entity collection in adapter mode.

can you help me and give some detail how did you plan and desig the validation of data - especially when they are entered directly to a grid or databinding attached field

thany you, kr dieter

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39752
Joined: 17-Aug-2003
# Posted on: 28-Mar-2005 13:45:00   

ds wrote:

Hello, i am new with llblgen and i tryed the validate functions. i expierenced some problems with it: - in the fieldvalidate i can return false and in an attached datagrid the change is undone - thats fine, but i found no way to pass an information back WHY this was done (error or information message). as well it would be nice to have access to the whole entity when a field change

You could throw an exception in the field validation classes, it's up to you.

for the entity validator i found no way to register it on a entity collection in adapter mode.

You can do this in a derived class for the entity factory. As you have to pass in an entity factory to the entity collection, pass in an instance of a derived class of the entity factory, which then automatically instantiates the entity validator.

Frans Bouma | Lead developer LLBLGen Pro