Jsf 2 <;f:convertNumber/>;及<;f:convertDateTime/>;在primefaces对话框中不工作
我正在使用JSF2.1和PrimeFaces3.5 我正在使用“f:convertNumber”和“f:convertDateTime”格式化数字和日期,它在正常屏幕中工作,但在对话框中不工作(按下“添加”按钮后,我将显示对话框) 这是我的密码:Jsf 2 <;f:convertNumber/>;及<;f:convertDateTime/>;在primefaces对话框中不工作,jsf-2,primefaces,Jsf 2,Primefaces,我正在使用JSF2.1和PrimeFaces3.5 我正在使用“f:convertNumber”和“f:convertDateTime”格式化数字和日期,它在正常屏幕中工作,但在对话框中不工作(按下“添加”按钮后,我将显示对话框) 这是我的密码: <p:dialog id="receiptdialogprint" modal="true" widgetVar="printDlgId" header="Success" draggable="true" closable="false" re
<p:dialog id="receiptdialogprint" modal="true" widgetVar="printDlgId" header="Success" draggable="true" closable="false" resizable="false" maximizable="false" minimizable="false" style="font-family:Arial; font-size:11px;" appendToBody="true" width="50%">
<h:form id="receiptdialog_form">
<p:panelGrid id="payment_receipt_Panel" style="width:80%">
<p:row>
<p:column style="text-align:left;width:45%">
<p:outputLabel value="Date " style="font-size:16px" />
</p:column>
<p:column style="text-align:left;width:45%">
<h:outputText id="payment_date" value=":   #{paymentreceipt.paymentdate}">
<!-- <f:convertDateTime for="payment_date" type="date"/> -->
<f:convertDateTime dateStyle="medium"/>
<f:convertDateTime type="date" pattern="dd-MM-yyyy" />
</h:outputText>
</p:column>
</p:row>
<p:row>
<p:column style="text-align:left;width:45%">
<p:outputLabel value="Annual Memebership Fee(In Rs) " style="font-size:16px" />
</p:column>
<p:column style="text-align:left;width:45%">
<h:outputText value=":   #{paymentreceipt.paymentannualmemberfee_without_servicetax}" >
<f:convertNumber maxFractionDigits="2"/>
</h:outputText>
</p:column>
</p:row>
</<p:panelGrid>
</<h:form>
</p:dialog>
试试这个
<p:row>
<p:column style="text-align:left;width:45%">
<p:outputLabel value="Date :" style="font-size:16px" />
</p:column>
<p:column style="text-align:left;width:45%">
<h:outputText id="payment_date" value="#{paymentreceipt.paymentdate}">
<f:convertDateTime dateStyle="full" type="date"/>
</h:outputText>
</p:column>
</p:row>
<p:row>
<p:column style="text-align:left;width:45%">
<p:outputLabel value="Annual Memebership Fee(In Rs) :" style="font-size:16px" />
</p:column>
<p:column style="text-align:left;width:45%">
<h:outputText value="#{paymentreceipt.paymentannualmemberfee_without_servicetax}" >
<f:convertNumber maxFractionDigits="2" pattern="##,##0.00"/>
</h:outputText>
</p:column>
</p:row>
如果我们使用任何特殊字符,如空格或:以及日期和数字格式,我将使用richfaces。它不会转换。因此,替换冒号并尝试。如果您想使用冒号,请使用单独的h:outputLabel。理解我的错误……它工作正常……谢谢……:)