【发布时间】:2011-03-11 03:31:39
【问题描述】:
如果页面加载时没有呈现,我的 a4j:commandButton 不起作用。 请尝试以下操作:
<h:form>
<h:selectBooleanCheckbox value="#{showpnl}">
<a4j:support event="onclick" reRender="pnl" />
</h:selectBooleanCheckbox>
<a4j:outputPanel id="pnl">
<a4j:outputPanel rendered="#{showpnl}">
<h:inputText value="#{text}" />
<a4j:commandButton value="Go" reRender="out" />
</a4j:outputPanel>
</a4j:outputPanel>
<h:outputText id="out" value="Text: #{text}" />
</h:form>
如果你在第 7 行设置:<a4j:outputPanel rendered="true"> 就可以了!!!为什么?
【问题讨论】:
标签: richfaces