Hi, The Greate Mewel! :)
On Wed, 06 Nov 2013 08:53:48 -0200, thegreatmewel
<thegreatme...@gmail.com> wrote:
// 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).
Since 5.4-alpha-24 you can actually have BeanEditForm and BeanEditor
generate the HTML you want through setting some configuration symbols. I
just didn't documented it yet. Later today I'll post an example.
5.4-alpha-24 also uses Bootstrap 3.0.1 by default.
My questions:
1. I got an error for using "user.firstName" in t:id.
'value' is the parameter you want to pass user.firstName. 't:id' is the
component id. So it should be
<input t:type="TextField" t:id="firstName" value="user.firstName"
t:validate="required" class="form-control" />
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.
onSuccess() isn't called when validation fails. Use the Errors component
inside the form to show the errors.
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.
You can use 5.4-alpha-24 now, which already packs jQuery, and a newer
version of it, so you don't need to use tapestry5-jquery. It's an alpha,
ok, but it works very, very well.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org