2012-05-03 39 views
1

這是我dataTable,我需要我的bean屬性status是這樣的:JSF豆返回的HTML數據表

<span class="label label-warning">Warning</span>但打印文本,而不是編譯htmldataTablecolumn沒有espace選項。有沒有辦法解決這個問題?

<h:dataTable value="#{pedidoController.orderList}" var="order" 
           styleClass="table table-striped"> 
         <h:column> 
          <f:facet name="header">#</f:facet> 
          #{order.orderNo} 
         </h:column> 
         <h:column> 
          <f:facet name="header">Cliente</f:facet> 
          #{order.client} 
         </h:column> 
         <h:column> 
          <f:facet name="header">Data</f:facet> 
          #{order.date} 
         </h:column> 
         <h:column> 
          <f:facet name="header">Status</f:facet> 
          #{order.status} 
         </h:column> 
        </h:dataTable> 

回答

2

使用h:outputText來顯示數據而不是隱式的JSF輸出。檢查this related question,看看它是否能解決你的問題。

+0

謝謝,剛把我的bean行改成:' Gerep