0

うまく機能する Liferay コントロール パネル ポートレットを作成しました。次に、構成ページを追加します。私は次のようにしました:

  1. config-template init-parameter を portlet.xml に追加
  2. configuration-action-class を liferay-portlet.xml に追加します

ただし、構成メニューは表示されません。

構成が表示されない

ここに 2 つの記述子があります。

ポートレット.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>

何か不足していますか?

4

1 に答える 1

2

最初のビューでは、サポート要素にポートレット モードが表示されません。追加する必要があると思います

<portlet-mode>view</portlet-mode>
<portlet-mode>edit</portlet-mode>

内部は portlet.xml の要素をサポートしています。

于 2016-02-15T09:38:59.980 に答える