我尝试熟悉JSF 2.2并编写了facelet。这有一些语法错误。但是,编译器不会对此有所抱怨。我该如何改变呢?我用Maven部署应用程序。
maven package wildfly:deploy
建筑成功。
以下是小面:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f ="http://xmlns.jcp.org/jsf/core"
xmlns:h = "http://xmlns.jcp.org/jsf/html">
<body>
<f:view contracts="#{view.locale.language}">
<ui:composition template="/template.xhtml">
<ui:define name="content">
<h1> Meine Aktion </h1>
<h:form>
<h:dataTable value="#campaignListProducer.campaigns}" var="campaign_">
<h:column>
<h:commandLink value="x" actionListener="{listCampaignsController.doDeleteCampaign(campaign_)}" />
</h:column>
<h:column>
<f:facet name="header">Name</f:facet>
<h:outputText value="#{campaign_.name}" />
</h:column>
<h:column>
<f:facet name="header">Spendenziel</f:facet>
<h:outputText value="#{campaign_.targetAmount}">
<f:convertNumber type="currency" currencyCode="EUR" />
</h:outputText>
</h:column>
<h:column>
<f:facet name="header">Bisher gespendet</f:facet>
<h:outputText value="#{campaign_.amountDonatedSoFar}">
<f.convertNumber type="currency" currencyCode="EUR" />
</h:outputText>
</h:column>
<h:column>
<h:commandLink value="Editieren" action="#{listCampaignsController.doEditCampaign(campaign_)}" />
</h:column> etc...
例如错误的语法
#campaignListProducer.campaigns}"
无法识别。 actionListener="{listCampaignsController.doDeleteCampaign(campaign_)}"
中的语法也错误。
谢谢。