-
Sep 29th, 2010, 11:12 AM
#1
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
#2
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
#3
>>If you want the link to appear only in one list view for a specific domain object you can simply edit the list.jspx.
Stefan,
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?
thanks,
Lawrence
Last edited by objectguru; Sep 29th, 2010 at 01:07 PM.
Reason: enhancement
-
Oct 7th, 2010, 05:33 PM
#4
I did get this to work
-
Mar 31st, 2011, 02:45 AM
#5

Originally Posted by
objectguru
I did get this to work

Can you please post your solution? Thx
-
Apr 4th, 2011, 04:06 PM
#6
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
#7
Hi there,
Can you describe or post some example code to illustrate how this can be done ?
Thanks!!!!
-
Jan 17th, 2012, 10:22 AM
#8
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules