1
我在项目中看到了一个奇怪的问题。这是<h:commandButton/>
不执行操作方法。为什么h:commandButton在与c:选择组合时执行操作方法?
<c:choose>
<c:when test="#{empty param.t}">
// HTML
</c:when>
<c:when test="#{param.t eq 'normal'}">
// HTML
<h:form>
<h:commandButton value="ADD" action="#{addBean.doSomething}" />
</h:form>
<c:when>
</c:choose>
当我移动<h:form>
成第一c:when
,则动作方法被调用。否则,它不是。为什么?