Custom xtype not retrieving stored values
So, I'm encountering a weird problem with CQ5. One of the custom xtypes that I've created is correctly writing data to, but not pulling back saved data from, the repository. Just to be super clear, when I say pulling back saved data from, I mean when I refresh the page and then open the dialog again, all of the dialog fields for my xtype are blank. I can post the full code I'm working with if necessary but basically the custom xtype works in this way:
//pseudo code getValue() { return field1.getValue() + "|" + field2.getValue() + "|"+ field3.getValue() } setValue(value) { var splitArray = value.split("|"); field1.setValue(splitArray[0]) //etc } updateHidden() { this.hiddenField.setValue(this.getValue()) }and then the hiddenField has this.name as its name so it stores/retrieves from the repository. This works fine for storing the data in the repository. But it doesn't retrieve it back properly when I reopen the dialog after page refresh. What's bizarre is that the custom xtype DOES work properly for both storing and retrieving when it's within a multifield. I've debugged the JS and there's nothing immediately obvious that comes to mind. Anyone witnessed this before? Many thanks for your help.