0

我正在尝试将 portlet 首选项存储在本教程中提到的支持 bean (JSF) 中

但是,我不明白他们是如何在这里导入 Preference 类的

Map<String, Preference> mutablePreferenceMap = (Map<String, Preference>) elResolver.getValue( facesContext.getELContext(), null, elExpression);

包裹javax.portlet.*不包含faces.preference.Preference

任何人都对此有所了解,特别是如何保存 portlet 首选项

提前致谢

4

1 回答 1

0

You have to add the Liferay Faces Bridge JAR to your project.

Add the following dependencies:

<dependencies>
  <dependency>
    <groupId>com.liferay.faces</groupId>
    <artifactId>liferay-faces-alloy</artifactId>
    <version>3.1.0-ga1</version>
  </dependency>
  <dependency>
    <groupId>com.liferay.faces</groupId>
    <artifactId>liferay-faces-bridge-impl</artifactId>
    <version>3.1.0-ga1</version>
  </dependency>
  <dependency>
    <groupId>com.liferay.faces</groupId>
    <artifactId>liferay-faces-portal</artifactId>
    <version>3.1.0-ga1</version>
  </dependency>
</dependencies>

and the liferay-faces-bridge-api jar which is a dependency for liferay-faces-bridge-impl has this Preference interface.

More info:

http://www.liferay.com/community/liferay-projects/liferay-faces/download

于 2012-12-05T17:33:19.473 回答