Custom Field Configuration - default value not displaying correctly

Ivana Navratilova August 23, 2017

I have developed a custom field, that is able to store two values (a number and a unit chosen from a selectbox). Field values are represented by a simple carrier object, that has just getters and setters for the two fields, plus some methods like toString and equals.

It seems that everything works fine, aside from displaying default values. In the field configuration screen, it only shows the String part of the carrier, not the number. I have verified by debugging that the default value chosen is stored correctly, as a number + string. When I click the Edit default value option, it shows what I put in before. However in the main configuration screen it still shows only the unit part.

I have checked my getDefaultValue method and it provides the right carrier filled with data. The program even seems to call the toString method of the carrier, and then proceeds to ignore the result of this method and only picks the String part of the carrier to display.

 

 

0 answers

Suggest an answer

Log in or Sign up to answer