我确信这是一件容易的事,但我无法在任何地方找到它.我如何以编程方式在Liferay内部制作一个portlet进入全屏模式.例如:相当于单击最大化按钮,但在代码中而不是必须让用户手动单击该按钮.
考虑到我有一个vanilla ZopeSkel plone3_portlet formlib生成的包,我需要做些什么修改?即:
我可以一直使用它,包括five.grok和plone.directives.form吗?
我正在尝试修复为自定义portlet管理器分配的日历portlet的月份导航.从特定的浏览器页面模板调用此管理器:
<div id="calendar"
tal:content="structure provider:my.custom.portletmanager" />
Run Code Online (Sandbox Code Playgroud)
不幸的是,管理器没有为我呈现带有哈希的包装器,所以我试图手动将kssattr-portlethash css类附加到上面的<div>标签,以使月导航工作(refreshPortlet()需要它).我试过这个:
from plone.portlets.utils import hashPortletInfo
class SectionHomeView(BrowserView):
"""SectionHome browser view
"""
implements(ISectionHomeView)
def __init__(self, context, request):
self.context = context
self.request = request
@property
def getHash(self):
info = dict(manager = 'my.custom.portletmanager',
category = 'context',
key = '/my-section',
name = 'mycalendar',
)
return hashPortletInfo(info)
Run Code Online (Sandbox Code Playgroud)
使用此代码我得到一个哈希,但日历导航仍然无法正常工作.如何才能访问portlet信息,例如经理,类别,密钥和名称,以便正确计算?
我希望我有来自plone.app.portlets.browser.templates的column.pt及其类ColumnPortletManagerRenderer(portlets/manager.py)所描述的行为,但我不知道如何让我的自定义管理器提供那些(即:like默认经理做).
我正在为Plone 4开发一个内容类型,我想阻止它可以从其父对象继承的所有用户,组和上下文portlet.我对此处的文档 - 在portlets.xml中完全感到困惑,<blacklist/>似乎只能解决特定于路径的阻塞问题.<assignment/>看起来像我想要的,但它似乎太具体了 - 我不想管理我的内容类型上所有可能的portlet的分配.
有一些提示我发现自定义特定于内容类型的ILeftColumn和IRightColumn portlet管理器,但我找不到任何好的例子.有没有人有任何提示或建议?我觉得我错过了一些简单的东西.
假设portlet X部署到Liferay并且映射了友好的URL.假设用户通过映射的URL进入Liferay Portal,但门户网站中不存在portlet - 它已部署但未添加到页面中.
我的问题是当用户使用映射的URL时没有任何反应 - 门户网站没有提供视觉反馈,目标 portlet不存在.
我怎么能改变呢?我需要向用户提供某种警报/通知......
- 编辑 -
我不需要使用第二个portlet来检查是否存在另一个portlet.
最亲切的问候,
我有一个使用服务构建器构建的Liferay Custom服务.我有WebArticleLocalHelperServiceImpl哪个是我服务的实现.
如何从其他插件项目调用我的服务.
我可以使用以下方法从速度模板项目调用服务:
// get the service using servicelocator.
#set ($myService = $serviceLocator.findService('my-services-portlet', 'com.mycompany.service.MyService'))
// then call the service method
#set ($result = $myService.mymethod())
Run Code Online (Sandbox Code Playgroud)
我可以从速度模板调用服务,但我无法从其他插件项目(Portlet)调用该服务
当我打电话ServiceLocator时MVCPortlet,它说ClassNotFound.
呼叫*serviceImpl来自的正确方法是什么MVCPortlet?
我也在搜索liferay论坛,但没有一个解决方案适合我.
非常感谢提前.
我是liferay 5.1技术的新手.
我错误地删除了登录portlet,现在我无法登录到应用程序.
我的意思是登录portlet不再可见,任何帮助都会有很大的帮助.
当我的portlet实例将从页面中删除时,我想捕获该事件以从该portlet获取一些首选项值,并执行某些操作.
在Liferay中有没有类似接口或钩子的东西?
我有liferay portlet,我需要在很大程度上依赖于AJAX调用.所以我需要多次调用serveResource方法.一种方法是我可以使用URL传递参数,然后根据该参数区分请求.
但在我的情况下,我必须多次调用serveResource,因为该方法很难维护.有没有这样做的框架?使用哪些代码变得可维护.
我使用Grails 2.0.4,Portlets Plugin 0.9.2和Liferay Portlets Plugin 0.4创建了一个自定义的Liferay 6.2 portlet .
部署portlet后,我收到一个奇怪的错误.这是发生的事情:
日志表明以下错误:
com.liferay.portal.NoSuchResourceActionException: <Portlet>_WAR_<PortletApp>#VIEW
Run Code Online (Sandbox Code Playgroud)
我见过其他情况,其中"#VIEW"表示"#ADD_TO_PAGE".请注意,portlet正在部署并在我用于开发的Liferay 6.2的香草版本上正常工作.
有谁知道这个问题可能是什么?谢谢.
堆栈跟踪:
Jan 16, 2014 10:42:40 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
com.liferay.portal.NoSuchResourceActionException: <Portlet>_WAR_<PortletApp>#VIEW
at com.liferay.portal.service.impl.ResourceActionLocalServiceImpl.getResourceAction(ResourceActionLocalServiceImpl.java:196)
at sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at com.sun.proxy.$Proxy85.getResourceAction(Unknown Source)
at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.doUpdateResourcePermission(ResourcePermissionLocalServiceImpl.java:1190)
at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.updateResourcePermission(ResourcePermissionLocalServiceImpl.java:1312)
at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.setOwnerResourcePermissions(ResourcePermissionLocalServiceImpl.java:1038)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62) …Run Code Online (Sandbox Code Playgroud)