参数化 portlet 并从虚拟机端访问这些参数
我有 portlet,我想通过一些静态属性将它们分成两组。我所说的静态是指该属性对于所有实例都是相同的(因此,据我所知,它与 portlet 配置不同 - 很有可能,我错了)。
那么,在基于 liferay vm 的主题中区分此 portlet 的最佳方法是什么? 在我的脑海中,我可以想象我正在放置一个可以从 servlet 上下文访问的属性文件。这个解决方案让我感到害怕(在每个请求上读取文件?!!),此外,我不知道如何从速度模板访问 servlet 上下文。
我将不胜感激任何谦虚的帮助。
I have portlets, and I want to separate them on two groups by some static property. By static I mean this property is the same for all instances (so, it is not the same like portlet configuration as far as I understand it - quite possible, I'm wrong).
So, what is the best way to differ this portlets in liferay vm-based theme?
Off the top of my head, I can imagine that I'm putting a properties file which I can access from servlet context. This solution is terrifying me (reading file on each request?!!), besides, I don't know how I exactly can access servlet context from velocity template.
I would appreciate any help with humility.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论