Sep 29th, 2010, 11:12 AM
Adding a link to the generated list view
I would like to add a button or link to the generated list view of one of my roo entities. The link would call out to another controller mapping with the Id of the entity to perform a service. How? Can I add another <table:column> tag with a link attached?
Sep 29th, 2010, 11:45 AM
If you want this link to be present in all list views you can simply add the link definition to table.tagx definition. There is also a reference.tagx you could consider.
If you want the link to appear only in one list view for a specific domain object you can simply edit the list.jspx.
Sep 29th, 2010, 12:03 PM
>>If you want the link to appear only in one list view for a specific domain object you can simply edit the list.jspx.
Yes, I want this link to apply to one list view for a specific entity. How can I insert an HREF into the tag-generated table? How can I reference the ID of the entity? Another question: How are the three links (view detail, edit, delete) at the end of each line generated?
Last edited by objectguru; Sep 29th, 2010 at 01:07 PM.
Oct 7th, 2010, 05:33 PM
I did get this to work
Mar 31st, 2011, 02:45 AM
Can you please post your solution? Thx
Originally Posted by objectguru
Apr 4th, 2011, 04:06 PM
Unfortunately the code is with the client and I don't recall exactly what I did. I'll try to re-create the solution for you this week.
Jan 16th, 2012, 05:27 PM
Can you describe or post some example code to illustrate how this can be done ?
Jan 17th, 2012, 10:22 AM
Okay, what you need to do is find the list view for the entity. It will probably be named "list.jspx" in a path like:
\ui\mvc\src\main\webapp\WEB-INF\views\<entity name>\list.jspx These files are roo-generated but can be edited. See if you can add new column to the list with your custom callout url. If you examine the code, this should be fairly easy and you can see how variables are DE-referenced with expression language constructs. You should be able to call a service method and pass the id of the entity by constructing a URL. When I was working at DirecTV I used this method for a Video DRM proof of concept app.
Tags for this Thread