我有一个问题,以显示图像到<p:dataTable>
。我正在关注的BalusC的指示here但是当我尝试使用context.getCurrentPhaseId()
如下,方法getCurrentPhaseId()未定义类型FacesContext
FacesContext context = FacesContext.getCurrentInstance();
if (context.getCurrentPhaseId() == PhaseId.RENDER_RESPONSE) {
return new DefaultStreamedContent();
}
然后Eclipse中显示了context.getCurrentPhaseId()
以下编译错误:
的方法getCurrentPhaseId()是未定义的类型FacesContext
这是如何造成的,我该如何解决? 我正在使用JSF 2和Primefaces 2.2快照。
发布带有问题的代码。 –
这可能只是你的错误(它发生在我身上的次数超过了我的数量,尝试评论和取消注释违规行,你也可以尝试重建你的项目 – kolossus
我试过了,但错误仍然存在 – leoJerez