• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Problem with headers in sorted rich:datatable with subtable

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to everyone!

I have a sorted rich:datatable with a subtable, but I have to put subheaders. How can I do this? I have attached an image that shows my problem.

This is my current code:

<rich:dataTable
id="tablaDocumentosBandejaEntrada" rows="20" styleClass="resultados"
onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
cellpadding="1" cellspacing="1" width="100%"
value="#{reporte.documentoEnBandejaEntrada}"
var="documentoEnBandejaEntrada"
rendered="#{reporte.documentoEnBandejaEntrada != null}"
rowClasses="impar"
>

<rich:column rowspan="#{documentoEnBandejaEntrada.expedientesAsociadosADocumento.size()+1}">
<f:facet name="header">
<h:outputText value="Ver Expediente" />
</f:facet>
<a4j:commandButton id="verExpediente" alt="Ver Expediente" image="/img/ver_detalle_01.gif" action="#{verExpedienteDesdeReporte.begin()}"
rendered="#{reporte.renderedVerExpediente(documentoEnBandejaEntrada.idDocumento)}">
<f:param name="idExpediente" value="#{reporte.obtenerIdExpediente(documentoEnBandejaEntrada.numeroExpediente)}" />
<f:param name="bandejaEntradaCopia" value="false" />
</a4j:commandButton>
</rich:column>

<rich:column rowspan="#{documentoEnBandejaEntrada.expedientesAsociadosADocumento.size()+1}">
<f:facet name="header">
<h:outputText value="Ver Documento" />
</f:facet>
<a4j:htmlCommandLink immediate="true" border="0px" target="_blank" action="#{visualizador.verDocumento(documentoEnBandejaEntrada.idDocumento)}"
rendered="#{reporte.renderedVisualizarExpediente(documentoEnBandejaEntrada.idDocumento)}">
<h:graphicImage border="0px" alt="#{documentoEnBandejaEntrada.idDocumento}" url="/img/icono_visualizar_doc_adjunto.gif" />
</a4j:htmlCommandLink>
</rich:column>

<rich:column
sortable="true" sortBy="#{documentoEnBandejaEntrada.tipoDocumento}"
rowspan="#{documentoEnBandejaEntrada.expedientesAsociadosADocumento.size()+1}">
<f:facet name="header">
<h:outputText value="Tipo Documento" />
</f:facet>
<h:outputText value="#{documentoEnBandejaEntrada.tipoDocumento}" />
</rich:column>

...................................

<rich:column colspan="5" style="vertical-align: top;">
<f:facet name="header">
<h:outputText value="Datos de Bandeja" /> <!-- This is the main header but I have to put subheaders! -->
</f:facet>
<rich:subTable id="tablaDocumentosBandejaEntrada" styleClass="resultados" onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" cellpadding="1" cellspacing="1" width="100%" var="expedienteAsociado"
value="#{documentoEnBandejaEntrada.expedientesAsociadosADocumento}">
<rich:column>
<h:outputText value="#{expedienteAsociado.destinatario.cargo.unidadOrganizacional.descripcion}" />
</rich:column>
<rich:column> <h:outputText value="#{expedienteAsociado.destinatario.cargo.descripcion}" />
</rich:column>
<rich:column> <h:outputText value="#{expedienteAsociado.destinatario.getNombreApellido()}" />
</rich:column>
<rich:column> <h:outputText value="#{expedienteAsociado.fechaDespacho}">
<f:convertDateTime pattern="dd/MM/yyyy HH:mm" locale="#{reporte.locale}" timeZone="#{reporte.timeZone}" />
</h:outputText>
</rich:column>
<rich:column>
<h:outputText value="#{expedienteAsociado.fechaAcuseRecibo}">
<f:convertDateTime pattern="dd/MM/yyyy HH:mm" locale="#{reporte.locale}" timeZone="#{reporte.timeZone}" />
</h:outputText>
</rich:column>
</rich:subTable>
</rich:column>
</rich:dataTable>

Columns in subtable donĀ“t have to be sorted.

Thanks in advance!

BusquedaEntrada.png
[Thumbnail for BusquedaEntrada.png]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic