title: Tapestry 5.2: Update Zone with data from Form
body: <p>I'm playing with tapestry 5.2.4 and AJAX.</p>
  
  <p>In my Test.tml I have a form:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form t:id="form"&gt;
     &lt;t:label for="userName"/&gt;:
     &lt;input t:type="TextField" t:id="userName" size="30"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And a zone that displays the variable "test":</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;t:zone t:id="myZone" id="myZone"&gt;
      &lt;p&gt;show test ${test}&lt;/p&gt;
  &lt;/t:zone&gt;
  </code></pre>
  
  <p>Now I try to put the value of the form field "userName" into the zone with an actionlink:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;t:actionlink t:id="SomeLink" zone="myZone" context="${userName}"&gt;update&lt;/t:actionlink&gt;
  </code></pre>
  
  <p>Here's the java class Test.java:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class Test {
  
      @Persist
      @Property
      private String userName;
  
      @Property
      private String test;
      @InjectComponent
      private Zone myZone;
  
      @Component
      private Form form;
  
      Object onActionFromSomeLink(String input) {
          test = input;
          return myZone.getBody();
      }   
  }
  </code></pre>
  
  <p>I thought this would "take" the value of the form field userName and pass it with an actionlink to the method onActionFromSomeLink. The method sets the variable "test" to input and the zone is displayed.</p>
  
  <p>This does not work and throws an error I do not understand:</p>
  
  <p>Ajax failure: Status 500 for <code>/example/test.somelink</code>: Request event 'action' (on component Test:somelink) was not handled; you must provide a matching event handler method in the component or in one of its containers.</p>
  
  <pre><code>Communication with the server failed: Request event 'action' (on component Test:somelink) was not handled; you must provide a matching event handler method in the component or in one of its containers.
  </code></pre>
  
  <p>How can I implement a function, that takes input from a form and then updates a zone?</p>
  
  <p>Cheers</p>