Liferay:如何保存到Portlet用户信息? [英] Liferay: how to save to portlet user information?

查看:121
本文介绍了Liferay:如何保存到Portlet用户信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在欢迎页面上有一个天气portlet,用户可以配置portlet并选择他的城市.是否可以在portlet首选项中存储用户信息,以便每个用户都拥有一个存储的城市?还是在不开发自己的(持久性)服务的情况下存储用户门户信息的标准工作流程是什么?

I have at the welcome page a weather portlet, and user can configure the portlet and select his city. Is it possible to store user information in the portlet preferences, so that every user has his one stored city? Or what is the standard workflow to store user-portlet information without to develop own (persist) service?

thx

推荐答案

默认情况下,portlet首选项位于liferay中,而不是特定于用户的.可以在liferay-portlet.xml中用下一行进行修改:

The portlet-preferences are in liferay per default not user specific. That can be modified in liferay-portlet.xml with next lines:

<liferay-portlet-app>
  <portlet>
    <portlet-name>ThePortletWitchUserSpecificPreferences</portlet-name>
    <icon>/icon.png</icon>
    <preferences-unique-per-layout>false</preferences-unique-per-layout>
    <preferences-owned-by-group>false</preferences-owned-by-group>
  </portlet>
...
</liferay-portlet-app>

<preferences-...和两行的缩写.

有关更多信息,请参见: http://rutvijshah.wordpress.com/2009/生活中12/06/user-specific-preferences/

for more information see: http://rutvijshah.wordpress.com/2009/12/06/user-specific-preferences-in-liferay/

这篇关于Liferay:如何保存到Portlet用户信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆