On 08/06/2011 04:46 PM, Eric Torti wrote:
The only doubt I still have is whether the<t:selectObject ...>  tag is
supposed to work nested inside the<t:beaneditform ...>  tag.
The bean model does not automatically create fields for the ManyToOne links, so they are not like standard part of the BeanEditForm, but I "add" virtual fields for them and proceed like this (just a piece of working tml in our app):

<form t:type="beaneditform" t:id="newInstructor"
                    t:submitlabel="message:save" t:exclude="instructorID"
                    t:reorder="person, institution, fromDate, toDate"
                    t:add="person,institution">
<p:person>
<t:label for="person" />
<t:selectObject t:id="person" list="persons" value="newInstructor.person"
labelField="literal:lastName '\s' firstName '\s' userName" keyField="literal:personId" blankOption="NEVER" />
</p:person>
<p:institution>
<t:label for="institution" />
<t:selectObject t:id="institution" list="institutions"
value="newInstructor.institution" labelField="literal:title" keyField="literal:institutionId" blankOption="NEVER" />
</p:institution>
</form>

But, have in mind that the doc from the wiki does not do all of what I said, as I have made some additional changes (like for example the "keyField"). But you can try to read the source carefully and customize it depending on what exactly you need.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to