我有一个带有属性图片的对象资源。
如果在我的网格中,我会这样做:
<p:pictureCell>
<img src="${context:/css/images/pic.jpg}" width="110" height="80" />
</p:pictureCell>
我可以显示图片。但是,如果我试图从对象中获取它,我就不能
<p:pictureCell>
<img src="${resource.picture}" width="110" height="80" />
</p:pictureCell>
我该怎么做?
答案 0 :(得分:1)
我找到了对我问题的回应:
我必须这样做:
<p:pictureCell>
<img src="${context:}${resource.picture}" width="110" height="80" />
</p:pictureCell>
我希望它有助于某人