慕哥9229398
2019-06-17 14:41:11
AJAX更新/呈現(xiàn)不適用于已呈現(xiàn)屬性的組件我正在嘗試Ajax更新一個(gè)有條件呈現(xiàn)的組件。<h:form>
... <h:commandButton value="Login" action="#{login.submit}">
<f:ajax execute="@form" render=":text" />
</h:commandButton></h:form><h:outputText id="text" value="You're logged in!" rendered="#{not empty user}" />然而,這是行不通的。我可以保證#{user}實(shí)際上是可用的。這是如何造成的,我如何解決呢?
1 回答

MMTTMM
TA貢獻(xiàn)1869條經(jīng)驗(yàn) 獲得超4個(gè)贊
document.getElementById()
<h:form> ... <h:commandButton ...> <f:ajax ... render=":text" /> </h:commandButton></h:form><h:panelGroup id="text"> <h:outputText ... rendered="#{not empty user}" /></h:panelGroup>
另見(jiàn):
添加回答
舉報(bào)
0/150
提交
取消