Announcement Announcement Module
Collapse
No announcement yet.
Adding a link to the generated list view Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #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.

    Comment


    • #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, 01:07 PM. Reason: enhancement

      Comment


      • #4
        I did get this to work

        Comment


        • #5
          Originally posted by objectguru View Post
          I did get this to work
          Can you please post your solution? Thx

          Comment


          • #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.

            Comment


            • #7
              Hi there,

              Can you describe or post some example code to illustrate how this can be done ?

              Thanks!!!!

              Comment


              • #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.

                Comment

                Working...
                X