title: Wicket: change component body from IBehavior::onComponentTag
body: <p>I am implementing the Wicket IBehavior interface and want my behavior change the body of a component (or somehow update the model) from the onComponentTag method.
  Is there a way to do this?</p>
  
  <pre><code>@Override
  public void onComponentTag(final Component component, final ComponentTag tag)
  {
      String myValue = tag.getAttribute("myAttribute");
  
      // TODO: Based on the value of this attribute, update the body/model of the component
  
  
      super.onComponentTag(component, tag);
  }
  </code></pre>
  
  <p><strong>Edit</strong>: I would like to grab an attribute from the html which specifies the maximum number of allowed characters for the element and then programmatically truncate the body of the element if needed.  </p>
  
  <p>Example:</p>
  
  <pre><code>&lt;span wicket:id="myLabel" maxChars="10"&gt;The body of my tag&lt;/span&gt;
  </code></pre>
  
  <p>would be replaced with:</p>
  
  <pre><code>&lt;span wicket:id="myLabel" maxChars="10"&gt;The bod...&lt;/span&gt;
  </code></pre>