Announcement Announcement Module
Collapse
No announcement yet.
Custom property editors and Spring RCP validation? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom property editors and Spring RCP validation?

    I'm creating a property editor with a custom component, and I'm trying to figure out how to make it so that Spring RCP's built-in validation will work with it. The property editor is quite simple in that it is simply a JTextField that verifies that it can parse the text as a number and formats that number as currency on focus lost (which is why I think I need a custom component, so I can register the focus lost listener encapsulated inside the property editor itself).

    When I supply my custom property editor, I can see in the Spring RCP code that my required validation rule is registered, but for some reason when I tab out (I'm using a focus lost value setter), it doesn't seem to be validating the field.

    Any ideas?

    Thanks,
    Scott Wells

  • #2
    Never mind. I got it to work. I was being an idiot. When focus shifted, I was firing a property change event, but I wasn't calling setValue() before I did so and Spring RCP was doing the right thing and short-circuiting any processing because it looked like the value hadn't changed.

    Thanks,
    Scott

    Comment

    Working...
    X