You can use a behavior to set whether a component is visible or enabled
based on a model.
The wicketstuff-minis project has two behaviors that do just this:
https://javadoc.io/doc/org.wicketstuff/wicketstuff-minis/latest/org/wicketstuff/minis/behavior/EnabledModelBehavior.html
https://javadoc.io/
The primary reason for not using IModel's as control mechanisms for
visibility and enabling of components is memory usage. Wicket applications
can have millions of Component instances at any given time in runtime
memory, and adding 2 references plus the overhead of the IModel objects
would be quite