Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1896

Allow custom columns to the Roo table tag


    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.0.M1, 1.1.0.M2, 1.1.0.M3, 1.1.0.RC1, 1.1.0.RELEASE, 1.1.1.RELEASE, 1.1.2.RELEASE
    • Fix Version/s: None
    • Component/s: WEB MVC
    • Labels:


      I wish I would have bugged this up a lot earlier, but I haven't been working with ROO for a while and didn't have a chance when I was. Anyhow, I am calling this a bug because of how limiting it is.

      I created a production site using ROO 1.1.0 M1-RC1 and I really enjoyed using ROO for the most part (http://covercontest2010.pictage.com – This site originally allowed a Photographer to upload an image, then allow users and judges to vote on the images in order to select the magazine cover winner). However, the part I found the most limiting was the inability to modify the generated html. Specifically, the table tag. The table tag is extremely limiting. The reason being is that it tries to do too much with as little as possible. Beyond that, it is not customizable. You can't do anything with the generated html except throw it out.


      I needed to add a thumbnail for each row of displayed data. The thumbnail is generated based on the primary key. I could not simply add:
      <table:column><img src="${object.id}.jpg" /></table:column>

      I needed to generate information in a column that was a composite of multiple pieces of other information.

      I needed to modify what was displayed in the table header (title) without modifying what was displayed in the table body.

      At the bare minimum, allow addition of columns that do not require specifying an id to a corresponding property.

      Rework the tag so that the column header is separate from the column tag OR (better) if a column header tag is specified, the column tag does not generate a header.

      Allow for a css class property to be specified on any of the generated html tags (I actually needed to apply a css class to a table header element and was unable to do this). For that matter, PLEASE consider adding an optional tr tag. I can think of numerous reasons why you would want to do this (allowing alternating css based upon the row #).

      To Summarize
      There would almost never be a case where you would use the ROO generated html in a production environment (other than admin pages). However, ROOs hash mechanism is extremely powerful and it would be nice to be able to utilize this for maintaining production pages. This becomes possible by breaking up the ROO table tag to either use traditional html or more closely resemble it.




            • Assignee:
              sdmurphy Scott Murphy
            • Votes:
              7 Vote for this issue
              5 Start watching this issue


              • Created: