【发布时间】:2017-03-22 21:59:52
【问题描述】:
我有一个列gst_invoice_type 的供应商表。该表有两行,值为 F 和 S。
在我的 PrimeFaces 数据表中,我还创建了一个包含 Gst_Invoice_Type 列的表,其下拉菜单过滤器如下代码
<p:column filterBy="#{vo.gstInvoiceType}" headerText="GST Invoice Type." sortBy="#{vo.gstInvoiceType}"
style="width:130px;" visible="false">
<f:facet name="filter">
<p:selectOneMenu style="width:110px; vertical-align:middle;" autoWidth="false"
onchange="PF('varTable').filter()">
<f:selectItem itemLabel="ALL" itemValue="" noSelectionOption="true" />
<f:selectItem itemLabel="Full Tax Invoice" itemValue="F" />
<f:selectItem itemLabel="Simplified Invoice" itemValue="S" />
</p:selectOneMenu>
</f:facet>
<h:outputText value="#{vo.gstInvoiceType}"/>
</p:column>
When select All, all data (F and S) will be retrieved and located in Gst_Invoice_Type, which working correctly.但是是否可以让 F 和 S 显示为 Full Tax Invoice 和 Simplified Invoice ?
【问题讨论】:
-
对不起,我不明白。请详细说明您想要什么或问题所在。
-
@irieill 好的。我在 MySQL 中有
F和S的值。有没有办法让 PrimeFaces dataTable 中的 F 显示为 Full Tax Invoice 和 S 显示为 Simplified Invoice ?
标签: jsf labels conditional-rendering