title: wicket: how to make div height dependent on another div
body: <p>I'm a GWT refugee, trying to figure out how to do various Ajax-ish things in Wicket.</p>
  
  <p>I have two divs. I'd like to make the first div's <code>max-height</code> dependent on the height of the second div, with a "more/less" link so that the user can expand the first div. </p>
  
  <p>Example:</p>
  
  <p><img src="https://i.stack.imgur.com/PjoFw.png" alt="enter image description here">
  The content of both divs is variable, and since div2 has wrapped text in a proportional font, I can't really predict its height until rendered in the browser.</p>
  
  <p>In GWT I accomplished this by adding content to the div1 a line at a time, and if it exceeded the height of div2 (which already had its content rendered), I simply removed the line. Since GWT runs on the client, this is fairly straightforward.</p>
  
  <p>What's the best way to do this in Wicket? I'm expecting to need a little Javascript, but if there is a component that already does this (or makes it easier) I'd be very happy to use it.</p>