如何通过代码添加嵌套portlet(liferay)
我们在 liferay 中有一个叫做嵌套 portlet 的东西。我想通过代码动态添加此 portlet。有谁知道添加嵌套 portlet 并在其中添加其他 portlet 的代码吗?
谢谢 !!!
We have something called nested portlets in liferay. I want to add this portlet dynamically through code. Does anyone know the code for adding nested portlets, and add other portlets inside it?
Thanks !!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于完整的示例,我假设您想要使用另一个 portlet 操作处理程序将嵌套 portlet 添加到当前页面。 (如果在渲染操作中使用,则在页面的下一个视图之前您不会看到嵌套的 portlet)
将这些方法添加到您的代码中
如果您愿意(而且可能愿意)将嵌套 portlet 添加到另一个页面或不从 portlet 添加嵌套 portlet,您可以查找 Layout 和 User,而不是从 ThemeDisplay 获取它们。
for complete example i'll assume that you want to add nested portlet to current page using another portlets action handler. (if used from render action you would not see nested portlet until next view of the page)
Add these methods to your code
If you would like, and probably you would, to add nested portlet to another page or not from portlet, you can lookup Layout and User instead of getting them from ThemeDisplay.