例外が発生します
javax.el.PropertyNotFoundException: Property 'printIDs' not found on type pl.com.pir.beans.SelectedItemBean
at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:237)
at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:214)
at javax.el.BeanELResolver.property(BeanELResolver.java:325)
at javax.el.BeanELResolver.getValue(BeanELResolver.java:85)
at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
at org.apache.el.parser.AstValue.getValue(AstValue.java:183)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:185)
at com.sun.faces.facelets.el.ELText$ELTextVariable.toString(ELText.java:217)
at com.sun.faces.facelets.el.ELText$ELTextComposite.toString(ELText.java:157)
at com.sun.faces.facelets.compiler.CommentInstruction.write(CommentInstruction.java:77)
at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:437)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:124)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
しかし、私のコードでは、このメソッドはコメント化されています。コードで「printIDs」文字列を検索して、Web ブラウザーのキャッチと Cookie をクリアしようとしましたが、すべての出現箇所もコメント化されています。face-config.xml と web.xml を調べて、webapp を削除します。 tomcat webapps ディレクトリで、PC を再起動しても何も役に立ちません。
<!-- MENU GENERATOR -->
<h:panelGroup layout="block" id="produktMenu">
<o:dataTable value="#{productBean.productList}" var="produkt" pageSize="10"
style="margin-top: 15px; width: 100%; height: 420px;">
<o:multipleRowSelection rowDatas="#{productBean.list}" style="background: #a4aec5; color: white;" />
<o:columnReordering />
<f:facet name="columnMenu">
<o:columnMenu />
</f:facet>
<o:column header="Kategoria" width="7%"
sortingExpression="#{produkt.kategoria}"
bodyStyle="padding-left: 5px; padding-right: 5px;"
headerStyle="text-align: left; padding-left: 5px; padding-right: 5px;">
<f:facet name="subHeader">
<o:dropDownFieldFilter maxlength="4" customValueAllowed="false" />
</f:facet>
<h:outputText value="#{produkt.kategoria}" />
</o:column>
<o:selectionColumn style="width: 6%;" sortable="true"
header="Selection">
<f:facet name="header">
<o:selectAllCheckbox />
</f:facet>
</o:selectionColumn>
<f:facet name="below">
<o:dataTablePaginator id="paginator" />
</f:facet>
<o:column id="symbolCol1" sortingExpression="#{produkt.symbol}">
<f:facet name="header">
Symbol
</f:facet>
<h:outputText value="#{produkt.symbol}" />
</o:column>
<o:column id="opisCol1" sortingExpression="#{produkt.opis}">
<f:facet name="header">
Opis
</f:facet>
<h:outputText value="#{produkt.opis}" />
</o:column>
<o:column id="cenaCol1" sortingExpression="#{produkt.cena}">
<f:facet name="header">
Cena
</f:facet>
<h:outputText value="#{produkt.cena}" />
</o:column>
</o:dataTable>
</h:panelGroup>
<h:commandButton value="Dodaj" action="#{selectedItemBean.submit}" />
<o:dataTable value="#{productBean.list}" var="l" id="resultTable">
<o:column id="resultSumbolCol" sortingExpression="#{l.symbol}">
<f:facet name="header">
Symbol
</f:facet>
<h:outputText value="#{l.symbol}" />
</o:column>
<o:column id="resultOpisCol" sortingExpression="#{l.opis}">
<f:facet name="header">
Opis
</f:facet>
<h:outputText value="#{l.opis}" />
</o:column>
<o:column id="resultCenaCol" sortingExpression="#{l.cena}">
<f:facet name="header">
Cena
</f:facet>
<h:outputText value="#{l.cena}" />
</o:column>
</o:dataTable>
SelectedItemBean ソース:
public String submit() {
for (Map.Entry<Integer, Boolean> entry : selectedIDs.entrySet()) {
if (entry.getValue() == true) {
System.out.println("id: " + entry.getKey() + ", "
+ entry.getValue());
id.add(entry.getKey());
}
}
System.out.println("SelectedItemBean.submit() --> " + id.size());
return "selected";
}
public String printIDs() {
int i = 0;
if (id.isEmpty())
return null;
System.out.println("printIDs <--");
Iterator<Integer> it = id.iterator();
while (it.hasNext()) {
i++;
System.out.println(it.next());
}
System.out.println("suma produktow: " + i + "\nprintIDs -->");
pb = new ProductBean();
StringParse sp = new StringParse();
idList = sp.prepareInStatement(id);
try {
list = pb.getProductByID(idList, 2);
suma = cumputeCosts(list);
} catch (SQLException e) {
e.printStackTrace();
}
return "TESTprintIDs";
}
なぜこの例外が発生し続けるのですか?