title: Is there a way to dynamically change a button's CSS class?
body: <p>I'm working on a Wicket-based web application. In the application there are buttons that not every user is authorized to use. These buttons are actually simple links, e.g.</p>
  
  <pre><code>&lt;a wicket:id="publishButton" title="Publish" class="rightPanel_publish"&gt;&lt;wicket:message key="publish"/&gt;&lt;/a&gt;
  </code></pre>
  
  <p>with a CSS class (from an external CSS file) that sets their visual appearance, e.g.</p>
  
  <pre><code>a.rightPanel_publish {
      display: block;
      width: 90px;
      height: 27px;
      background: url( ../imgs/right_panel_icon03.gif ) left top repeat-y;
      text-decoration: none;
      color: black;
      padding: 12px 0px 0px 35px;
  }
  </code></pre>
  
  <p>When the user is not authorized to use the button, the link is disabled (in Java) and the CSS, for some reason, is not used anymore.</p>
  
  <p><strong>My question</strong> is this: is there a way to identify that the link is disabled at runtime and change the CSS class? I would rather avoid using javascript (managed to keep the entire project JS-free so far...), and prefer something that would work with all browsers.</p>
  
  <p>Thanks a bunch,</p>
  
  <p>Yuval =8-)</p>