无法在网格中显示 jpg img (tml)

发布于 2024-12-27 15:37:37 字数 388 浏览 6 评论 0原文

我有一个带有属性图片的对象资源。

如果在我的网格中我这样做:

<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>

我该怎么办?

I have an object Resource with an attribute picture.

If in my grid I do:

<p:pictureCell>
    <img src="${context:/css/images/pic.jpg}" width="110" height="80" />
</p:pictureCell>

I can display the picture. But if I try to get it from the object I can't

<p:pictureCell>
    <img src="${resource.picture}" width="110" height="80" />
</p:pictureCell>

How should I do it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嗼ふ静 2025-01-03 15:37:37

我找到了我的问题的答案:

我必须做:

<p:pictureCell>
    <img src="${context:}${resource.picture}" width="110" height="80" />
</p:pictureCell>

我希望它可以帮助别人

I've found the response to my problem:

I have to do:

<p:pictureCell>
    <img src="${context:}${resource.picture}" width="110" height="80" />
</p:pictureCell>

I hope it helps somebody

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文