Properties 将日历导出的名称从“更改为”;liferay.ics“;

Properties 将日历导出的名称从“更改为”;liferay.ics“;,properties,calendar,liferay,Properties,Calendar,Liferay,有人知道如何在导出之前更改liferay日历事件的文件名吗? 默认值为“liferay.ics” 谢谢 Sabrina你可以通过写一个钩子来改变名字 覆盖位于%liferay\u文件夹%\%your\u服务器%\webapps\ROOT\html\portlet\calendar的export\u import.jspf文件 <aui:fieldset label="export"> <aui:input cssClass="lfr-input-text-con

有人知道如何在导出之前更改liferay日历事件的文件名吗? 默认值为“liferay.ics”

谢谢
Sabrina

你可以通过写一个钩子来改变名字

覆盖位于%liferay\u文件夹%\%your\u服务器%\webapps\ROOT\html\portlet\calendar的export\u import.jspf文件

<aui:fieldset label="export">
        <aui:input cssClass="lfr-input-text-container" label="" name="exportFileName" type="text" value="liferay.ics" />
    </aui:fieldset>

嗨,我在我的钩子中更改了它,我在tomcat文件中检查了它是否被修改,我重新启动了liferay,但是在ics下载期间新名称仍然没有出现。。你知道我是否遗漏了什么吗?谢谢Sabrina
<portlet:param name="exportFileName" value="<%= event.getTitle() %>" />
<c:if test="<%= CalEventPermission.contains(permissionChecker, event, ActionKeys.VIEW) %>">
        <portlet:actionURL windowState="<%= LiferayWindowState.EXCLUSIVE.toString() %>" var="exportURL">
            <portlet:param name="struts_action" value="/calendar/export_events" />
            <portlet:param name="redirect" value="<%= currentURL %>" />
            <portlet:param name="eventId" value="<%= String.valueOf(event.getEventId()) %>" />
        </portlet:actionURL>

        <liferay-ui:icon
            image="export"
            url='<%= exportURL %>'
        />
    </c:if>
<?xml version="1.0"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.1.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_1_0.dtd">

<hook>

    <custom-jsp-dir>/WEB-INF/jsps/</custom-jsp-dir>
    <struts-action>
        <struts-action-path>/calendar/export_events</struts-action-path>
        <struts-action-impl>aiao.liferay.strutsactions.ExportEventActionWrapper</struts-action-impl>
    </struts-action>
</hook>
public class ExportEventActionWrapper extends BaseStrutsPortletAction {

    @Override
    public void processAction(StrutsPortletAction originalStrutsPortletAction, PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
        _logger.info("Call To Wrapper");

        //do your magic here...

        originalStrutsPortletAction.processAction(portletConfig, actionRequest, actionResponse);
    }

    private Log _logger = LogFactoryUtil.getLog(ExportEventActionWrapper.class);

}