JSF h:列标记固定宽度 [英] JSF h:column tag fix width

查看:104
本文介绍了JSF h:列标记固定宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我如何使用JSF固定数据表中列的宽度吗?

Can someone show me how to fix the width of a column in a datatable with JSF?

我的代码当前显示为:

<h:column>
    <f:facet name="header">
        <h:outputText value="Data Field 1" />
    </f:facet>
    <h:commandLink id="dataLink" action="#{pc_SearchResultsFragment.setField1}">
        <h:outputText value="#{(qi.data1 != null) ? '' : qi.data1}"/>                 
    </h:commandLink>
</h:column>

谢谢!

推荐答案

<h:column>
    <f:facet name="header">
        <h:outputText value="Data Field 1" />
    </f:facet>
    <h:commandLink id="dataLink" action="#{pc_SearchResultsFragment.setField1}">
        <h:outputText value="#{(qi.data1 != null) ? '' : qi.data1}"/>                     
    </h:commandLink>
    <%-- <f:attribute name="width" value="20" /> fixed width --%>
    <%-- or --%>
    <%-- <f:attribute name="width" value="20%" /> percentage --%>

    <%-- also available (not a complete list, just some of the more
         common supported attributes) --%>
    <%-- <f:attribute name="align" value="left" /> --%>
    <%-- <f:attribute name="height" value="20" /> --%>
    <%-- <f:attribute name="nowrap" value="true" /> --%>
    <%-- <f:attribute name="valign" value="top" /> --%>
    <%-- <f:attribute name="bgcolor" value="red" /> --%>
    <%-- <f:attribute name="style" value="color:White;" /> --%>
</h:column>

这篇关于JSF h:列标记固定宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆