PropertySupport for validation - NullPointerException

Hi everyone,

I'm currently trying to use PropertySupport to validate the contents of a constrained string datatype. Here is my code:

The idea is: The validator function is given the node and the column index of a table. Based on that column index, it decides which property needs to be validated against, and checks if the node's current contents (the passed Object) could actually be set in a valid way (setting via set() doesn't check for validity, so I need to have a way to check for invalid property contents afterwards, when rendering my custom Swing table. I don't want to check for validity before setting because I wouldn't want the entered text to be lost).

This function is called from inside a Command runnable, so that's not an issue anymore. However, I still keep getting NullPointerException-s on rendering.

 

Please sign in to leave a comment.