无法在liferay对话框中打开portlet [英] Not able to open a portlet in liferay dialog
问题描述
您没有访问此portlet所需的角色。
但是,如果我在页面上添加相同的portlet,则在页面和对话框上都会打开portlet。我在这里缺少什么?有人有什么想法
我的代码是:
#set($ profile_url = $ portletURLFactory.create($ request,profile_WAR_profileportlet,$ getterUtil.getLong($ plid),RENDER_PHASE))
$ profile_url.setParameter(p_p_state,exclusive)
< a href =#id =profileonclick =openDialog('$ profile_url','preferences-dialog',500,500)>个人资料< / a>
窗口,
'openDialog',//函数名称
函数(url,popupID,wd,ht){// function
var A = AUI();
popupDialog = new A.Dialog({
id:popupID,// popupId传递,以便通过关闭按钮$ b以外的事件来轻松关闭它$ b中心:false,//所有不同的参数功能,您可以检查合金API
draggable:true,
可调整大小:false,
宽度:wd,
堆栈:
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']
);
提前感谢任何人可以提供的任何帮助。
我认为您在 liferay-portlet.xml
中缺少以下配置> profile_WAR_profileportlet portlet:
< add-default-resource> true< / add-default-资源>
这应该设置为 true
在对话框弹出窗口中访问的portlet,这里是文档为此元素。
有关更多信息,您可以查看此 answer 点4& 5的答案将有助于您。
I have a dialog in my portal which opens a portlet. When I click on the link and the dialog opens, the dialog shows
You do not have the roles required to access this portlet.
However, if I add the same portlet on the page, the portlet opens without any hitch, both on the page and the dialog. What am I missing here? Anybody got any idea ?
My Codes are :
#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']
);
Thanks in advance for any help that anyone can provide.
I think you are missing the following configuration in the liferay-portlet.xml
of the profile_WAR_profileportlet
portlet:
<add-default-resource>true</add-default-resource>
This should be set to true
for the portlet which is accessed inside the dialog pop-up, here is the documentation for this element.
For more information you can look at this answer the points 4 & 5 of the answer would be of help to you.
这篇关于无法在liferay对话框中打开portlet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!