0
何が間違っていますか? Liferay Dynamic Data Listポートレット内に表示する値を取得できません。テンプレートコードは次のとおりです。現在、ヘッダの後には何も表示されません。しかし、私はレンダリングされたHTMLの中にclosing tableタグを見る。動的データリストにデータがありません - Velocity Liferay
#set ($ddlRecordService = $serviceLocator.findService('com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService'))
#set ($recordSetId = $getterUtil.getLong($reserved_record_set_id.data))
#set ($records = $ddlRecordService.getRecords($recordSetId))
<table class="table table-striped">
<caption>Audio files listing of FDR speeches</caption>
<thead>
<tr>
<th>Date</th>
<th>Description</th>
<th>Tape information</th>
</tr>
</thead>
<tbody>
#foreach($record in $records)
#set ($audioDate = $record.getField("audioDate").getValue())
#set ($audioDesc = $record.getField("audioDesc").getValue())
#set ($audioLink = $record.getField("audioLink").getValue())
<tr>
<td>$audioDate</td>
<td>$audioDesc</td>
<td>$audioLink</td>
</tr>
#end
</tbody>
</table>
「tr」が生成されていますか?そうでない場合は、あなたの '$ records'が空であるか、人口が集まらないと思います。 –