2012-04-27 56 views
0

我得到了JSF Tomahawk消息,並且這些消息被呈現爲一個HTML表格。我如何避免這樣的表格?我寧願爲每個消息包含一個段落的所有消息使用一個div。提前致謝。JSF t:消息 - 如何避免表?

我的JSF文件 - 摘錄:

<t:messages layout="table" replaceIdWithLabel="true" showDetail="true" showSummary="false" styleClass="mycustomclasswhichgrabsthisshit" /> 
+0

佈局= 「名單」? – Daniel 2012-04-27 11:42:12

回答

1

檢查Tomahawk tag documentation。該<t:messages> tag documentation說以下內容:

Name | Type | Supports EL? | Description 
-------+--------+--------------+--------------------------------------------- 
layout | String | Yes   | The layout: "table" or "list". Default: list 

所以,相應的修復:

<t:messages layout="list" ... /> 

或者只是刪除它完全。這已經是默認了。

如有必要,可以刪除使用CSS列表子彈:

.mycustomclasswhichgrabsthisshit { 
    list-style-type: none; 
} 

(免責聲明:ranty類名是從字面上你的例子複製的,它不是我的)

+0

您的免責聲明讓我微笑:-)。 – Jochen 2012-04-28 07:46:35