Announcement Announcement Module
Collapse
No announcement yet.
Custom-Complex validation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom-Complex validation

    How to handle situation if validation requires complex data processing. Is there a way to push an error into dialog message/error area "manually"?

  • #2
    Jurijus,
    we may be able to help you better if you could you let us know what exactly are you trying to do? What's unsatisfactory about using Constraints?

    Ollie

    Comment


    • #3
      I am updating a record, one of the updatable values is part of the index (combobox), I have to make sure that the user does not select the value which would cause duplicate index. I have to loop through all the records to see that there is no duplicate, and this validation should occur upon button click.

      Comment


      • #4
        I'm not sure I follow what you're describing. Couldn't you just provide a PropertyConstraint that checks for "duplicate index"?

        Could you provide a bit of code to illustrate the case some more.

        Comment


        • #5
          so, I will create my own constraint like

          public class MyCustomConstraint extends TypeResolvableConstraint {
          public MyCustomConstraint() {
          super("customConstraint");
          }

          public boolean test(Object argument) {
          // implementation of constraint
          }
          }

          and the "test" method will have my data validation logic?

          Comment


          • #6
            Exactly. ;-)

            Comment

            Working...
            X