But honestly, even after playing around with the options available, I can’t seem to find a way to do this with Enumeration type fields that have yet to be filled out.
I’d really appreciate any information of how to avoid this NPE issue while still allowing me to work with the data in this fashion for the custom exportDisplay method of printing this document.
I’ve had problems getting the Reporting add-on functioning correctly, and need to do it this way as a work around.
I’ve still had no luck in figuring this out. I’d love a simple solution. I’m sure it’s out there, I’m just not familiar enough with working in this environment.
Add an ‘empty’ value to your enumeration and initiate the entity field with this value. You need to add a validation to this field in case a field is mandatory.
This could be 0 or -1 in case of integer enumeration and empty string in case of string enumeration.
Same solution will work with associations.
Actually, come to think of it, this option might not work given that data is already entered in the application and these values aren’t necessarily set. Hmmm. Darn it!
I’m still very much hoping for some assistance from the CUBA developers. If all Enumeration type fields are filled out, there is no issue, but if any are null, my validation check seems to be ignored.