开发者

jsf table : display cell borders when cell is empty

开发者 https://www.devze.com 2023-02-13 05:19 出处:网络
In my jsf pages i have table with column as such where i am checking if value is empty than put a space in cell.

In my jsf pages i have table with column as such where i am checking if value is empty than put a space in cell.

<h:column >
        <f:facet name="header">
               <h:outputText
                       value="File" style="color:red;"/>
        </f:facet>
        <h:outputText value="#{logs.FILE == null ? ' ' : logs.FILE}"/>
</h:column>

Html displayed

<td class="sc5"> </td>

In Firefox as wel开发者_运维技巧l as IE, when a cell in table is empty, no cell borders are drawn. but chrome does draw border. So how can i make firefox and IE to draw borders for empty cells.


Try outputting a non-breaking space &nbsp; instead of a ' ' in a blank cell.

<h:outputText value="#{logs.FILE == null ? '&nbsp;' : logs.FILE}" escape="false" />
0

精彩评论

暂无评论...
验证码 换一张
取 消