On 9/20/07, Jean-Philippe Steinmetz <[EMAIL PROTECTED]> wrote: > Is there a way to add extra parameters to a grid component without having to > modify the source class/bean itself? I am displaying a list of objects that > I want to add a column for Edit and Delete links for each item. These links > should not be part of the data structure since they are part of a framework > that exists outside of tapestry itself. Should I be using a different > component?
I did this yesterday based on comments on this mailing list. Page.java @Inject private BeanModelSource bms; @Inject private ComponentResources resources; private BeanModel userModel; @SetupRender void setup() { // Create model userModel = bms.create(UserDetails.class, false, resources); // Add new fields userModel.add("action", new ActionPC()).label("Actions").sortable(false); // Setup column order userModel.get("action").order(10); } Page.html <t:grid model="userModel" source="users" row="user"> <t:parameter name="actionCell"> <a t:type="pagelink" page="admin/users/edit" context="user.user_id">edit</a> </t:parameter> </t:grid> -- regards, Robin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]