2
让我们假设我有下一个图形图像标签的形式重新渲染的<h:graphicImage的由<P:的commandButton
<p:lightBox styleClass="imagebox " id="imageLightBox" rendered="true">
<h:outputLink value="http://..../center/#{myBean.centerId}/picture" title="Bla bla bla">
<h:graphicImage value="http://..../center/#{myBean.centerId}/picture" />
</h:outputLink>
</p:lightBox>
内部和我有下一个primefaces命令按钮
<p:commandButton icon="fa fa-save" value="Save" title="Save" actionListener="#{myBean.saveCenterImage()}" update="@form" >
因此,如何能我重新渲染graphicImage当我点击commandButton。
如果你正在更新表单,它应该实际上被重新渲染,很可能你错过了process =“imageLightBox”或process =“@form”。顺便说一句,我会删除呈现的属性,因为它始终是真的(除非它只是为了清晰起见),请参阅https://stackoverflow.com/questions/9010734/why-do-i-need-to-nest-a -component-with-rendered-some-in-another-component-w/ –
@MárioFernandes:进程属性用于在服务器上处理关于提交的值的内容。你仍然可以更新**未处理的东西。 – Kukeltje
你调试了什么?你检查了ajax响应吗?它包含什么?相同或新的网址?浏览器试图检索它吗?导致304?请解释更多 – Kukeltje