enhancement (proposal) for component.setDisabled

enhancement (proposal) for component.setDisabled

I see a lot of hard to maintain code dealing with enabling/disabling components.

Would it not be COOL if Ext provided some help. Typically application needs to disable/enable components based in response to different things like: security roles, dirty state of the form, mode of entry (delete button disabled for new entries, enabled for editing existing), or some complex form of validation/business logic.

It boils down to the following: components have REASONS for being disabled, component should be enabled if there are no such reasons, disabled if there is one or more reason to be disabled. I think of this a voting, various parts of logic vote but instead of Yea and Nay they get to say Yea or Veto.

Interesting suggestion, would like to hear if others would value such a thing. I see a large number of possible ways to do this so whatever the outcome is it would have to be abstract enough that separate implementations could be swapped in and out.

Just for the record though, our top priority right now is polishing what's already present before we think about adding new features.