Hi, I'm new to Tapestry and have some problems using forms. I have the following simple setup:

// my entity class
@Entity
public class User {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @NonVisual
    public Long id;

    @Validate("required")
    public String firstName;

}

// my controller class
public class RegisterUser {

    @Property
    private User user;

    @CommitAfter
    Object onSuccess() {
        session.persist(user);
        return index;
    }

}

// and my form
<html t:type="layout" title="Create Account"
  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";>

<form t:type="form" t:id="registerForm" class="form-horizontal"
  role="form">

  <div class="form-group">
    <t:label for="firstName" class="col-sm-2 control-label" />
    <div class="col-sm-6">
      <input t:type="TextField" t:id="user.firstName" t:validate="required"
        class="form-control" />
    </div>
  </div>
  <input type="submit" value="Create" />
</form>

</html>

As you see i liked to use bootstrap and some extra html markup in my form. So the default beaneditform isn't what i wanted here (its working by the way).

My questions:
1. I got an error for using "user.firstName" in t:id. If I just use "firstName" I have to add the same property in my RegisterUser class. But I'd like to avoid that. It is possible to build a form just with the "user" variable?

2. If I use "firstName" instead of "user.firstName" and hit the submit button, nothing happens. The onSuccess method is not called and I don't get any log message in my console.

3. When is tapestry 5.4 released (a week, a month or a year). I like to use jquery instead of prototype. The Tapestry5-jQuery works, but it uses an old jquery version.

Thanks in advance, and I like the framework :).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to