控制面板 portlet 的配置页面未出现
Configuration page of control panel portlet does not appear
我创建了一个运行良好的 Liferay 控制面板 portlet。
现在我想添加一个配置页面。我做了如下:
- 将配置模板初始参数添加到 portlet.xml
- 在liferay中添加配置-action-class-portlet.xml
但是,没有出现配置菜单:
这是两个描述符。
portlet.xml
<portlet>
<portlet-name>manage-apples-portlet</portlet-name>
<display-name>Apple Management Admin</display-name>
<portlet-class>de.apples.portlet.ManageApplesPortlet</portlet-class>
<init-param>
<name>config-template</name>
<value>/html/manage-apples-portlet/config.jsp</value>
</init-param>
<init-param>
<name>view-jsp</name>
<value>/html/manage-apples-portlet/view.jsp</value>
</init-param>
<init-param>
<name>jsp-path</name>
<value>/html/manage-apples-portlet/</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<resource-bundle>content.Language</resource-bundle>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
liferay-portlet.xml
<portlet>
<portlet-name>manage-apples-portlet</portlet-name>
<icon>/icon.png</icon>
<configuration-action-class>com.liferay.portal.kernel.portlet.DefaultConfigurationAction</configuration-action-class>
<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>10.0</control-panel-entry-weight>
<instanceable>false</instanceable>
<css-class-wrapper>manage-apples-portlet</css-class-wrapper>
</portlet>
我是不是漏掉了什么?
乍一看,我没有在支持元素中看到 portlet 模式,我认为你应该添加
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
里面支持portlet.xml的元素。
我创建了一个运行良好的 Liferay 控制面板 portlet。 现在我想添加一个配置页面。我做了如下:
- 将配置模板初始参数添加到 portlet.xml
- 在liferay中添加配置-action-class-portlet.xml
但是,没有出现配置菜单:
这是两个描述符。
portlet.xml
<portlet>
<portlet-name>manage-apples-portlet</portlet-name>
<display-name>Apple Management Admin</display-name>
<portlet-class>de.apples.portlet.ManageApplesPortlet</portlet-class>
<init-param>
<name>config-template</name>
<value>/html/manage-apples-portlet/config.jsp</value>
</init-param>
<init-param>
<name>view-jsp</name>
<value>/html/manage-apples-portlet/view.jsp</value>
</init-param>
<init-param>
<name>jsp-path</name>
<value>/html/manage-apples-portlet/</value>
</init-param>
<expiration-cache>0</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
</supports>
<resource-bundle>content.Language</resource-bundle>
<security-role-ref>
<role-name>administrator</role-name>
</security-role-ref>
<security-role-ref>
<role-name>power-user</role-name>
</security-role-ref>
<security-role-ref>
<role-name>user</role-name>
</security-role-ref>
</portlet>
liferay-portlet.xml
<portlet>
<portlet-name>manage-apples-portlet</portlet-name>
<icon>/icon.png</icon>
<configuration-action-class>com.liferay.portal.kernel.portlet.DefaultConfigurationAction</configuration-action-class>
<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>10.0</control-panel-entry-weight>
<instanceable>false</instanceable>
<css-class-wrapper>manage-apples-portlet</css-class-wrapper>
</portlet>
我是不是漏掉了什么?
乍一看,我没有在支持元素中看到 portlet 模式,我认为你应该添加
<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>
里面支持portlet.xml的元素。