3

ポータルにポートレットを開くダイアログがあります。リンクをクリックしてダイアログを開くと、ダイアログに次のように表示されます。

このポートレットにアクセスするために必要な役割がありません。

ただし、ページに同じポートレットを追加すると、ページとダイアログの両方で、ポートレットが問題なく開きます。ここで何が欠けていますか?誰かが何か考えを持っていますか?

私のコードは:

#set ($profile_url = $portletURLFactory.create($request, "profile_WAR_profileportlet", $getterUtil.getLong($plid), "RENDER_PHASE"))
 $profile_url.setParameter("p_p_state", "exclusive")

<a href="#" id="profile" onclick="openDialog('$profile_url','preferences-dialog',500,500)"> Profile </a> 



window,
        'openDialog', //function name
        function(url, popupID, wd, ht) { // parameters to the function
            var A = AUI();

            popupDialog = new A.Dialog({

                    id: popupID, // popupId passed so that it would be easy to close it through events other than the close button
                    centered: false, // all the different parameters function you can check in the Alloy API
                    draggable: true,
                    resizable: false,
                    width: wd,
                    stack: true,
                    modal: true,
                    height: ht,
                    scrollbars: true,
                    xy: [getWidth()/2-wd/2,10]
                }
            ).plug(
                A.Plugin.IO,
                {
                    uri: url
                }
            );

            popupDialog.render();
        },
        ['aui-dialog','aui-dialog-iframe']
    );

誰もが提供できる助けを事前に感謝します。

4

3 に答える 3

5

ポートレットliferay-portlet.xmlの次の構成が欠落していると思います。profile_WAR_profileportlet

<add-default-resource>true</add-default-resource>

trueこれは、ダイアログ ポップアップ内でアクセスされるポートレットに対して設定する必要があります。この要素のドキュメントは次のとおりです。

詳細については、この回答を参照してください。回答のポイント 4 と 5 が役に立ちます。

于 2013-02-13T09:50:06.280 に答える
0

$ profile_urlを設定しているのに、実際には$ Preferences_urlのダイアログを開いている可能性がありますか?私はpreferences_urlが以前に定義されていると思います-そして設定(例えばポートレット編集モード)は通常、通常のレンダリングフェーズよりも多くの権限を必要とします。管理者としてこれにアクセスしてクロスチェックします。

于 2013-02-13T08:27:37.800 に答える
0

portal-ext.properties ファイルに以下の 2 行を追加します

portlet.add.default.resource.check.enabled=true
portlet.add.default.resource.check.whitelist=3,56_INSTANCE_0000,58,82,86,103,113,145,164,166,170,33,---here append the portlet id which you want to display 
于 2015-03-25T09:23:32.343 に答える