刷新< ui:define>在jsf中 [英] refresh a <ui:define> in jsf
本文介绍了刷新< ui:define>在jsf中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的jsf中有一个这样的"ui:define":
I have a "ui:define" in my jsf like this :
<ui:define name="javaScript">
<script type="text/javascript"> #{PendingTree.buildHistoryForTree} </script>
<script type="text/javascript"> #{PendingTree.buildDescriptionForTree} </script>
<script type="text/javascript">
.
.
.
</script>
</ui:define>
如果某些事件已经完成,我想刷新ui:define; 我该怎么做?
I want to refresh the ui:define if some event have been done; how can I do this job ?
推荐答案
您只能ajax更新JSF组件.
You can only ajax-update JSF components.
将其包装在JSF组件中(前提是您将其放置在<h:body>
的底部).
Wrap it in a JSF component (provided that you placed this inside (bottom of) <h:body>
).
<h:panelGroup id="scripts" layout="block">
<ui:define name="scripts">
<h:outputScript>
#{bean.script1}
#{bean.script2}
.
.
.
</h:outputScript>
</ui:define>
</h:panelGroup>
然后您可以像下面这样引用它:
Then you can reference it like below:
<f:ajax ... render=":scripts" />
这篇关于刷新< ui:define>在jsf中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文