I have created a VisualForce page that is basically a wall of inputFields. I had a requirement to make all of the inputFields into outputFields when a certain event happens (the event happens, all inputFields change into outputFields at the same time).
So far, what I have done, is that I have put inputFields in their own section (500+ lines of code), and I have also put outputFields in their own section (another 500+ lines of code).
The problem is, sometimes I get so many fields, I put the inputFields in, but then I forget to put some of the output fields in. This gets my testers complaining that I missed something.
Is there an easier or better way of doing this? Obviously I need to do better testing myself, however, it would be nice if I didn't have to basically duplicate code for every field, and potentially miss a field.
Thanks for your time.