Pergunta

I need to add a column to a Roo table which points the user to another URL. You can have columns with delete and update buttons using update="true" for example, but I want another button with my own URL.

I see the table:table and table:column tags are built in the default scaffolding.

I looked at adding table:simple and table:display tags but could not get them to work.

How would you add a column to a Roo table where you define your own URL (with the id of the row imbedded) and image?

Greg

Foi útil?

Solução

Its not easy to just add a custom column tag, as the column tags don't actually render the value, they just tell the table what columns should be rendered and the table tags does the actually rendering.

Therefore, the easiest way is to modify the table tag as follows:

  • copy table.tagx to tableCustom.tagx
  • add extra custom column to tableCustom, based on the "update" column
  • modify any views that need to use this new column to use tableCustom

The reason for copying the tag is that it allows you to update the roo tags when a new version of spring roo is released, without losing your changes.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top