Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Reset Image Field - HELP!

Avatar

Former Community Member
I'm trying to create a button that will selectively reset certain fields when pressed. I'm using ResetData and it seems to be working fine for all of my text, date and pulldown fields, but I can't get it to reset the image field. I've checked the spelling of the field and all other info... is there something I'm missing?
1 Reply

Avatar

Former Community Member
I solved my own problem after a great deal of searching. I'm still not sure if that was a bug or if I misunderstood the resetData usage. However, for future searchers here's how I solved the problem.



On the MouseUp event, I used resetData to clear all of the text and pulldown fields (this doesn't seem to work for my image field). So then, on the Click event, I added:



ImageFieldName.rawValue = null; (where ImageFieldName is the name of the image field I want to reset)



That seemed to do the trick.