On Wed, 06 Nov 2013 09:36:58 -0200, Thiago H de Paula Figueiredo
<thiag...@gmail.com> wrote:
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.
Using your own desired generated HTML as example and Tapestry
5.4-alpha-24, here it goes:
In your AppModule:
public static void
contributeApplicationDefaults(MappedConfiguration<String, String>
configuration) {
configuration.add(SymbolConstants.FORM_GROUP_LABEL_CSS_CLASS, "col-sm-2
control-label");
configuration.add(SymbolConstants.FORM_GROUP_FORM_FIELD_WRAPPER_ELEMENT_NAME,
"div");
configuration.add(SymbolConstants.FORM_GROUP_FORM_FIELD_WRAPPER_ELEMENT_CSS_CLASS,
"col-sm-6",
}
In your example, SymbolConstants.FORM_GROUP_WRAPPER_CSS_CLASS and
SymbolConstants.FORM_FIELD_CSS_CLASS do not need to be set because their
defaults match what you want.
Now you can just use BeanEditForm and BeanEditor with your POJO and have
the fields and labels and divs generated exactly the way you want. ;)
--
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