-
Book Overview & Buying
-
Table Of Contents
Tapestry 5: Building Web Applications
There are a few parameters that we could use to tweak the component. First of all, you will probably want the submit button to display a different label, not the default Create/Update. Nothing could be easier:
<t:beaneditform t:id="celebrity" t:submitLabel="Save"/>
You can also explicitly specify the object that BeanEditForm should work with, and use an arbitrary id:
<t:beaneditform t:id="celebrityEditor" t:object="celebrity" t:submitLabel="Save"/>
Although BeanEditForm made a lot of clever guesses, in many cases we shall want to somehow influence the way it works. As with the Grid component in the previous section, we'll want to remove the Id field and change the order of fields in the form, so that the Birth Date Verified check box is underneath the Birth Date control.
By the way, did you notice that the label for this control is Birth Date, not Date Of Birth, as would be automatically generated by Tapestry? This is because of the entry that we've added...
Change the font size
Change margin width
Change background colour