我在xhtml页面中使用了一个模板。我想点击命令按钮时更新表单。但是我得到了#34;找不到带表达式的组件"错误。这是我的代码。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core">
<body style="background-color: azure">
<h:outputStylesheet library="css" name="formOrtala.css" />
<h:outputStylesheet library="css" name="renk.css" />
<ui:composition template="/templates/mainTemplate.xhtml">
<ui:define name="body">
<h:body>
<h:panelGrid columns="2" id="kitapKayitForm">
<p:growl id="growl" showDetail="true" sticky="true" />
<h:outputText value="" />
<h3>#{res['ko.kitapKayit.kitapKayitForm.title']}</h3>
<p:outputPanel id="kitapIdPanel">
<p:spacer width="25" />
<h:outputText
value="#{res['ko.kitapKayit.kitapKayitForm.lastSavedbookId']} #{kitapKayitBean.lastBookId}"
style="color: blue;background-color: yellow;font-style: italic" />
</p:outputPanel>
<p:outputLabel
value="#{res['ko.kitapKayit.kitapKayitForm.kitapId']}" />
<p:inputText value="#{kitapKayitBean.entity.kitapID}" size="30"
required="true" id="kitapkayitid"
requiredMessage="#{res['ko.warning.emptyBookId']}" />
<p:outputLabel
value="#{res['ko.kitapKayit.kitapKayitForm.kitapAd']}" />
<p:inputText value="#{kitapKayitBean.entity.kitapad}" size="30"
required="true" id="kitapkayitad"
requiredMessage="#{res['ko.warning.emptyBookName']}" />
<p:outputLabel
value="#{res['ko.kitapKayit.kitapKayitForm.yazarAd']}" />
<p:inputText value="#{kitapKayitBean.entity.yazarad}" size="30"
required="true" id="kitapkayityazarad"
requiredMessage="#{res['ko.warning.emptyAuthorName']}" />
<p:outputLabel
value="#{res['ko.kitapKayit.kitapKayitForm.kitapTur']}" />
<p:selectOneMenu value="#{kitapKayitBean.ilgiValue}"
required="true" filter="true" id="kitapkayitkitaptur"
requiredMessage="#{res['ko.warning.emptyBookType']}">
<f:selectItem itemLabel="Seçiniz" />
<f:selectItems value="#{kitapKayitBean.ilgiAlanList}" var="ial"
itemLabel="#{ial.description}" itemValue="#{ial.description}" />
</p:selectOneMenu>
<p:outputLabel
value="#{res['ko.kitapKayit.kitapKayitForm.kitapDurum']}" />
<p:selectOneRadio value="#{kitapKayitBean.entity.kitapdurum}"
required="true" id="kitapkayitkitapdurum"
requiredMessage="#{res['ko.warning.emptyBookSituation']}">
<f:selectItem itemValue="Rafta" itemLabel="Rafta" />
<f:selectItem itemValue="Rafta Değil" itemLabel="Rafta Değil" />
</p:selectOneRadio>
<p:outputPanel>
<p:commandButton value="#{res['ko.saveButton']}"
icon="#{res['ko.saveIcon']}"
actionListener="#{kitapKayitBean.kitapKaydet}" />
<p:spacer width="40" />
<p:commandButton value="#{res['ko.clearButton']}"
actionListener="#{kitapKayitBean.clearForm}"
icon="#{res['ko.cancelIcon']}" update="kitapkayitform" />
</p:outputPanel>
</h:panelGrid>
</h:body>
</ui:define>
</ui:composition>
</body>
</html>
我正在更新清算表格。代码中的最后一行。如何解决这个问题?