Products Downloads


French version


Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

The sequence passed as a parameter is changed directly: the value is added to the end of the sequence.

 


N.B: Adding a value to a sequence created literally is not allowed as there is a risk of causing side effects during successive template executions:

Pas de format
<#assign emptySeq = []/><#assign>
<#assign noUse = hardisCore.addToSequence(emptySeq, 1) />emptySeq>
emptySeq size:${emptySeq?size} 
If this fragment of code is kept in a cache by FreeMarker, the emptySeq size will be 2 on the second execution. The place needs to be written:
<#assign emptySeq = hardisCore.createArrayList() /><#assign>
<#assign noUse = hardisCore.addToSequence(emptySeq, 1) />emptySeq>
emptySeq size:${emptySeq?size}

...


Parameters

Hardis - Tableau personnalisé
alternateColorstrue

Sequence

seqValues

Sequence to change

Mandatory

All types

value

Value to be added to the end of the sequence

Mandatory

...



For example

Pas de format
<#assign newSeq = hardisCore.createArrayList() /><#assign>
<#assign noUse = hardisCore.addToSequence(emptySeq, true) /><#assign>
<#assign noUse = hardisCore.addToSequence(emptySeq, .now?date) /><#assign>
<#assign noUse = hardisCore.addToSequence(emptySeq, [1, 2, 3]) />emptySeq>
emptySeq size:${emptySeq?size}
Hardis - Haut de page

↑ Top of page

...