JSF中如何使h:panelGrid里的内容自动换行

firstrose 2006-07-19 11:18:45
<h:dataTable id="ttable" value="#{BbsHandler.threadList}" rendered="true" var="item" headerClass="table_header" rowClasses="table_item,table_item" cellpadding="4" cellspacing="1" border="0" > <h:column> <f:facet name="header"> </f:facet> <h:panelGrid columns="1" rendered="true"> <h:outputText value="由#{item.username}/#{item.adduser}发表于#{item.addtime}" > <f:convertDateTime timeZone="GMT+8" type="both" /> </h:outputText> <h:outputText value="  #{item.content}" /> </h:panelGrid> </h:column> </h:dataTable>






其中

<h:outputText value="  #{item.content}" />

一句输出的东西老是把表格撑得很宽。听说jsf需要依靠css,但是无论怎么加css都不行。谁有好办法吗?

谢谢!

注意,要给详细方法!我不想猜谜!
...全文
392 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
左大神在这 2006-07-19
  • 打赏
  • 举报
回复
你给你的表格的TD加上如下CSS就可以拉,td{word-break: break-all},

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧