Hi,
There appears to be a bug in validation that I do not believe was there before. It arises from the use of the following pattern:
[RuleFromBoolProperty("TestSave", DefaultContexts.Save, "Cannot save")]
[RuleFromBoolProperty("TestDelete", DefaultContexts.Delete, "Cannot delete")]
public bool ValidationProperty
{ … }
It appears that the validation system only recognises one of these rules but it is random which one is enforced and which is ignored.
To reproduce, you need to follow the reproduction instructions but noting that the rule that is enforced will be random so you will have to try one of two routes.
Thanks,
Jascha
Steps to Reproduce:
Run app.
Create a new Domain Object 1
Try to save with a MyProperty value of 0 (illegal). This may be allowed or may not.
If it was allowed then you can see that the save rule was ignored.
If it was not allowed then set the the value to 1 and save successfully.
Then change the value back to 0 and delete - this will be allowed even though it is invalid.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Jascha,
Thanks for reporting the issue and providing your sample. We have investigated your problem and found that this bug was already reported internally, and it has already been fixed in the next version of the suite.
Thanks,
Dennis
Hi Dennis,
Is there a workaround for 8.3.3?
Jascha
Hello Jascha,
To bypass the problem in the 8.3.3 version of the suite you should avoid the situation when more than one rule attribute of one type is applied for a member. The following code demonstrates this idea:
//BUG [RuleFromBoolProperty("TestSave", DefaultContexts.Save, "Cannot save")] [RuleFromBoolProperty("TestDelete", DefaultContexts.Delete, "Cannot delete")] //NO BUG [RuleFromBoolProperty("", "Save;Delete")]
Please let us know if this meets your needs.
Thanks,
Dennis
Hi Dennis,
Hmm not a very satisfactory workaround - much work that then needs to be undone and a change in functionality wrt the description the user gets! When can we expect 8.3.5?
Jascha
Hello Jascha,
Thank you for the feedback. We are sorry that this workaround doesn't meet your requirements. Unfortunately, we don't have an alternative variant for this version.
>>
When can we expect 8.3.5?
<<
If all goes according to our plan, we will release version 8.3.5 at the beginning of March. Unfortunately, we cannot provide a more exact time frame.
BTW, right now you can use the intermediate XAF and DXP builds, in which this problem is fixed. I uploaded the public fixes when I answered you for the first time. Is there any problem with these fixes? Why don't you use them?
We are looking forward to hearing from you and ready to help you in case we can do more for you here.
Thanks,
Dennis
Hi Dennis,
The fix is for 8.3.4 and I am using 8.3.3 and I am not happy to release code based on intermediate builds.
Jascha
Hi Jascha,
OK, I understand you, thanks for informing us and sorry for the inconvenience. Please let me know in case of any problem.
Regards,
Dennis