title: Tapestry event dynamic components
body: <p>I want to implement an eventhandler for a component, which is dynamically generated. That means I have a <code>Table</code>, whichs source is bound to a custom <code>TableModel</code> (which implements an interface <code>JsonGenerator</code>, with which the json data can be generated). In this <code>TableModel</code>, I add a few custom components, which fire an event (<code>valueChanged</code>) when their state changes. Those components have ids (1 to 4). However, I can't just add a method similiar to this:</p>
  
  <pre><code>void onValueChangedFrom1 ()
  </code></pre>
  
  <p>as there are times when no component with the id 1 exists. I'd get the following exception when trying anway:</p>
  
  <pre><code>Method de.[...].onValueChangedFrom1() references component id '1' which does not exist.
  </code></pre>
  
  <p>I can't modify the custom <code>TableModel</code>, the <code>JsonGenerator</code> nor the other custom components.</p>
  
  <p>It might be interesting to know that the values of the custom components can be accessed via the <code>Request</code> service of tapestry like that:</p>
  
  <pre><code>request.getParameter("1");
  </code></pre>
  
  <p>But how can I add an event handler when this value changes? Is this even possible in Tapestry?</p>