Nvelocity - Stampa un record basato su una condizione
Domanda
Sto cercando di stampare un record in nvelocity in base a determinate condizioni:
Di seguito è riportato lo snippet ... Fondamentalmente, loop tramite l'oggetto indirizzi e se l'attuale adtype è "indirizzo corrente", stampalo e quindi esce dal loop ...
Sto ricevendo "#break" nel mio output html ... come se lo stesse ignorando ..
Ho la versione 1.1.1 di Nvelocity
Grazie
#foreach($spAddress in $Report.Spouse.Addresses)
#if( $spAddress.AdType == "Current Address")
<tr>
<td width="23%">
<font size="2"><strong>$spAddress.AdType :</strong></font>
</td>
<td width="75%">
<font size="2">$spAddress.CivicNumber, $spAddress.StreetName,$spAddress.City, $spAddress.Province, $spAddress.PostalCode</font>
</td>
</tr>
#break
#end
#end
Nessuna soluzione corretta
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow