【发布时间】:2019-02-05 05:01:39
【问题描述】:
我正在开发测试任务,堆栈:thorntail 2.3.0.Final,PrimeFaces 6.2。
有例子:
public void onRowEdit(RowEditEvent event) {
FacesMessage msg = new FacesMessage("Car Edited", ((Car) event.getObject()).getId());
FacesContext.getCurrentInstance().addMessage(null, msg);
}
但我无法导入 FacesMessage 和 FacesContext,我的 IDE 在所有依赖项中都找不到它们
我的 pom.xml 带 bom 的一点点:
…
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>cdi</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jpa</artifactId>
</dependency>
<dependency>
<groupId>io.thorntail</groupId>
<artifactId>jsf</artifactId>
</dependency>
…
那么,发生了什么?是 jsf 2.3,对这个包有一些新的方法还是别的什么?
我已经阅读了有关 jsf 2.3 的信息,它具有新功能和一些弃用功能。
还有@ViewScoped?现在我们应该在 CDI 中使用什么?
import javax.faces.* 的包在哪里?
我很困惑……
【问题讨论】:
标签: jsf jakarta-ee thorntail