我的问题如下,我有一个用于布局我的 Web 应用程序的 template.xhtml
<div id="header">
<ui:insert name="header">
[Top Bar content will be inserted here]
</ui:insert>
</div>
<div id="main">
<ui:insert name="main">
[Nav Bar Left content will be inserted here]
</ui:insert>
</div>
<div id="button">
<ui:insert name="button">
[Nav Bar Left content will be inserted here]
</ui:insert>
</div>
然后我有一个 addOrder.xhtml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
template="/WEB-INF/template/popUpInsert.xhtml">
<ui:define name="header">
<h:outputLabel value="Status" />
<rich:inplaceInput value="#{ordineController.orderToSave.status}" />
<h:outputLabel value="Code" />
<rich:inplaceInput value="#{ordineController.orderToSave.code}" />
</ui:define>
<ui:define name="main">
Here there is a data table that contains lines of the order
</ui:define>
<ui:define name="button">
<h:form>
<a4j:commandButton value="Save" action="#{ordineController.addOrder()}" />
<h:form>
</ui:define>
但是当我尝试保存状态和代码都为空的订单时,我尝试将范围更改为按钮保存(执行 =“@all”)但没有
怎么了?