Versions: 
Tapestry 5.1
TSS 2.1.1-SNAPSHOT
Hibernate 3.3.1
      
Can anyone provide an example of embedding a form object that is not
explicitly a part of a BeanModel into the form?
Example: I want to edit a user from the users table, the users table has a
n:n relationship with roles. I want to allow an admin to select from a list
of available roles when they add or edit a user using a grid. Since roles
are not explicitly a part of the User bean its not rendered by default. How
do I embed the grid into the BeanEditform? 


code example so far:

<t:beaneditform
exclude="id,version,accountExpired,accountLocked,credentialsExpired,accountEnabled,passwordHint,Province"
                                    
reorder="username,firstname,lastname,password,email"
                                    autofocus="true"
                                    object="editemployee"
                                    clientValidation="true"
                                    submitLabel="Save Changes">
        <table t:id="roles"
                   t:type="grid" 
                   t:source="roles" 
                   t:row="role" 
                   t:rowsPerPage="10" 
                   t:pagerPosition="bottom"  
                   t:include="name,description"
                   t:add="Select">
                [Grid here]
                <p:selectCell>
                                <t:checkbox value="role.id"/>
                        </p:selectCell> 
        </table>
</t:beaneditform>

my grasp on Tapestry's component architecture is still tenuous, so thanks
for any help you can provide.
-- 
View this message in context: 
http://old.nabble.com/A-quick-example-of-embedding-components-in-a-beaneditform-tp28996913p28996913.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to