Em Mon, 27 Oct 2008 09:42:25 -0300, James Sherwood
<[EMAIL PROTECTED]> escreveu:
Thank you again:)
You're welcome again! :)
I used:
@OnEvent(component = "userEditor", value=Form.PREPARE) public void
instantiateObject() {
user = new User();
}
This produces the form but without a dropdown of occupation.
The user.occupation is just an occupation object and not a list so how do
you handle foreign keys in beaneditform?
Inside your BeanEditForm, use something like that:
<t:parameter name="occupation">
<select t:type="Select" t:model="occupationModel" .../>
</t:paramater>
The t:parameter tag is used by BeanEditForm to override the way some field
is showed to the user. You can see more details at the end of
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/BeanEditForm.html.
The Select component is just what you need to edit the occupation field
and its documentation is here:
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Select.html
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]