[英]jsf f:ajax render ony if value in execute not null or empty
我的jsf頁面有問題。 我不知道只有當“input”不為null或不為空時才能進行ajax渲染。
這是我的代碼:
<h:inputText id="input" value="#{control.query}"/>
<h:commandButton id="search" value="Search" action="#{control.getdata()}">
<f:ajax execute="input" render="datatable"/>
</h:commandButton>
謝謝!
在目標上使用rendered
屬性。
<h:panelGroup id="datatable">
<h:dataTable ... rendered="#{not empty control.query}">
...
</h:dataTable>
</h:panelGroup>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.