hi sid,

you need to use a Tapestry Submit component to submit the form.
otherwise the request wont be processed by Tapestry

g,
kris





Sid Ferreira <sid....@gmail.com> 
15.01.2009 20:58
Bitte antworten an
"Tapestry users" <users@tapestry.apache.org>


An
Tapestry users <users@tapestry.apache.org>
Kopie

Thema
Forms






Guys, Im trying to make a small search engine, but It isn't 
working.follows
the code:

TML:
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
  <head>
    <title>Tibox Test App</title>
  </head>
  <body>
    <div id="wrap">
      <div id="top"></div>
      <div id="content">
        <div class="header">
          <h1>Allert</h1>
          <h2>Fast Support</h2>
        </div>
        <div class="middle">
  <style type="text/css">
    .lista {
      width: 100%;
    }
  </style>
  <form t:type="form" t:id="names" class="lista">
    <t:errors/>
    <table>
      <tr>
        <td><input t:type="TextField" t:id="dsQuery" /></td>
        <td width="15%"><input type="submit" value="Atualizar"/></td>
      </tr>
    </table>
  </form>
        </div>
        <div class="clear" id="clear"></div>
      </div>
      <div id="bottom"></div>
    </div>
    <div id="footer">
    </div>
  </body>
</html>

Java:
public class Start
{
    @Component(id = "names")
    private Form _form;

    private Long cdCliente = new Long(7);

    @Property
    private String dsQuery;
    @Component(id = "dsQuery")
    private TextField dsQueryField;

    void onValidateForm() {
      if (dsQuery == null || dsQuery.trim().equals("")) {
        _form.recordError(dsQueryField, "First Name is required.");
      }
    }

    Object onSuccess() {
      //    new Exception("E..." + dsQuery).printStackTrace();
      return this;
    }
}

It had no onSuccess, but didn't worked either.
Im using the same Start.java as response to the form.

-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations

Reply via email to