Dynamic constraint provider [message #596470] |
Mon, 04 December 2006 08:40 |
Hallvard Traetteberg Messages: 673 Registered: July 2009 Location: Trondheim, Norway |
Senior Member |
|
|
I'm working on an editor and execution environment, and now I'm
struggling with constraint validation. I've several static
constraints, that check model properties that always should hold, and
these work well. However, some constraints depend on the execution
environment that is currently linked to the editor, so for this
purpose the static constraints cannot be used.
The documentation describes how you can declare "dynamic" constraint
provides, i.e. constraint providers that generate the constraints
dynamically. However, in my case I cannot use XML, since my dynamic
constraint provider must be created in the context of my execution
environment (and not just from a class name in the XML). There does
not seem to be a way to register a constraint provider instance to the
ModelValidationService, i.e. to add a constraint provider that is
created without the use of XML.
Am I wright, and if yes, isn't this a design flaw?
Hallvard
|
|
|
Powered by
FUDForum. Page generated in 0.04070 seconds