0

我正在为 Liferay 中的动态数据列表创建一个 freemarker 模板。现在,我想在单击此数据列表中的链接时重定向到查看条目/记录。

实际上我有一个查看按钮,它工作正常。但我想知道如何使用链接来做到这一点。我试着做<a href="${portletActionURL}">,但这没有用。

我的视图按钮代码:

<td>
    <#assign controlPanelGroup = groupService.getGroup(portalUtil.getDefaultCompanyId(), "Control Panel")><#assign controlPanelPlid = layoutLocalService.getDefaultPlid(controlPanelGroup.getGroupId(), true)><#assign portletActionURL = portletURLFactory.create(request,"167",controlPanelPlid,"ACTION_PHASE")>
        ${portletActionURL.setParameter("recordId", "${cur_record.getRecordId()}")}
        ${portletActionURL.setParameter("struts_action", "/dynamic_data_lists/view_record")}
        ${portletActionURL.setParameter("redirect", "${themeDisplay.getPortalURL()}${themeDisplay.getURLCurrent()}")}

    <#if permissionChecker.hasPermission(scopeGroupId, "com.liferay.portlet.dynamicdatalists.model.DDLRecordSet", "${reserved_record_set_id}", "VIEW")>
    <form action="${portletActionURL}" method="POST">
        <input type="submit" value="view">
    </form>
    </#if>
</td>

你们有什么想法吗?

4

0 回答 0