简体   繁体   中英

One common column in a jsf datatable

I'm manipulating a dataTable in order to display a List of objects. In the first 4 columns it shows attributes related to the object such as año(year),etc.., as you can see in the image below. The thing is.., in the 5th,I want to insert in a one simple column, an image that is common to all the objects in the table. Is there a way to to this with jsf ?

在此处输入图片说明

In JSF without xxxFaces: <td rowspan="2">
In RichFaces: <rich:column rowspan="2">
In PrimeFaces: <p:column rowspan="2">
(Change 2 to proper number)

Maybe when you will use custom table tag with ui:repeat you could achieve what your are trying to do. eg

<table>
<ui:repeat var=... value=... varStatus="myVarStatus">
<tr>
  <td>.</td>
  <td>..</td>
  <td>...</td>
</tr>
</ui:repeat>

you could use this construction "#{myVarStatus.index}" to add proper collspan in right moment.

It is easy to do with richfaces rich:column tag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM