Same code for two livetables where only the class changes, but livetable for second class doesn´t work

This works

{{velocity}}
#set ($currentDocument = $doc.fullName)
#set ($columnsProperties = {
  'doccode': {},
  'doc.title': {"link":"view"},
  'departamentoResponsavel': {"html":true},
  'doc.creationDate': {},
  'doc.date': {},
  'doc.author': {"link":"author"},
  '_actions': {"sortable":false,"filterable":false,"html":true,"actions":["edit","delete"]}
})
#set ($options = {
  'className': 'procedimentos.Code.procedimentosClass',
  'translationPrefix': 'procedimentos.livetable.',
  'tagCloud': true,
  'rowCount': 15,
  'maxPages': 10,
  'selectedColumn': 'doccode',
  'defaultOrder': 'asc',
  'extraParams': "&departamentoResponsavel=$escapetool.url($currentDocument)"
})
#set ($columns = ['doccode', 'doc.title', 'departamentoResponsavel', 'doc.creationDate', 'doc.date', 'doc.author', '_actions'])
#livetable('procedimentos' $columns $columnsProperties $options)
{{/velocity}}

But this does not work

{{velocity}}
#set ($columnsProperties = {
  'doc.title': {"link":"view"},
  'shortText1': {},
  'departamentoResponsavel': {"html":true}, 
  '_actions': {"sortable":false,"filterable":false,"html":true,"actions":["edit","delete"]}
})
#set ($options = {
  'className': 'Gestão de Registros.Code.Gestão de RegistrosClass',
  'translationPrefix': 'gestaoRegistros.livetable.',
  'tagCloud': true,
  'rowCount': 15,
  'maxPages': 10,
  'selectedColumn': 'doc.title',
  'defaultOrder': 'asc',
  'extraParams': "&departamentoResponsavel=$escapetool.url($currentDocument)"
})
#set ($columns = ['doc.title', 'shortText1', 'departamentoResponsavel', '_actions'])
#livetable('gestaoRegistros' $columns $columnsProperties $options)
{{/velocity}}

the problem is that the second table for some reason don´t get the correct column titles
image

ok, discovered how to change the name, just need to add this extra parameter for each column

“displayName”: “NameColumn”

1 Like