-
1. Re: Table inside a column
pvito Nov 25, 2011 7:57 AM (in response to pzelenka00)Hi, Pavel.
How about this solution:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<h:outputStylesheet>
.rf-dt1 {
width: 100% !important;
}
</h:outputStylesheet>
</h:head>
<h:body>
<rich:dataTable value="#{myBeen.mlist}" var="v">
<rich:column>
<f:facet name="header">Day</f:facet>
<h:outputText value="#{v.value1}"/>
</rich:column>
<rich:column style="padding: 0px;">
<f:facet name="header">Category</f:facet>
<rich:dataTable value="#{v.list}" var="l" styleClass="rf-dt1">
<rich:column width="100">
<h:outputText value="#{l.value1}"/>
</rich:column>
</rich:dataTable>
</rich:column>
<rich:column style="padding: 0px;">
<f:facet name="header">Amount</f:facet>
<rich:dataTable value="#{v.list}" var="l" styleClass="rf-dt1">
<rich:column width="100">
<h:outputText value="#{l.value2}"/>
</rich:column>
</rich:dataTable>
</rich:column>
</rich:dataTable>
</h:body>
</html>
-
2. Re: Table inside a column
pzelenka00 Nov 25, 2011 8:27 AM (in response to pvito)Thanks Vitaliy, it is exactly what I need. I need one more little help. In column Amount I use h:inputText which breaks the height of lines in the table. Any idea how to fix it? Probably some CSS styles?
Thanks
-
3. Re: Table inside a column
pvito Nov 25, 2011 8:36 AM (in response to pzelenka00)It's possible using CSS:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<h:outputStylesheet>
.rf-dt1 {
width: 100% !important;
}
.rf-dt-c1{
padding: 0px !important;
}
</h:outputStylesheet>
</h:head>
<h:body>
<rich:dataTable value="#{myBeen.mlist}" var="v">
<rich:column>
<f:facet name="header">Day</f:facet>
<h:outputText value="#{v.value1}"/>
</rich:column>
<rich:column style="padding: 0px;">
<f:facet name="header">Category</f:facet>
<rich:dataTable value="#{v.list}" var="l" styleClass="rf-dt1">
<rich:column width="100">
<h:outputText value="#{l.value1}"/>
</rich:column>
</rich:dataTable>
</rich:column>
<rich:column style="padding: 0px;">
<f:facet name="header">Amount</f:facet>
<rich:dataTable value="#{v.list}" var="l" styleClass="rf-dt1">
<rich:column width="100" styleClass="rf-dt-c1">
<h:inputText value="#{l.value2}"/>
</rich:column>
</rich:dataTable>
</rich:column>
</rich:dataTable>
</h:body>
</html>
-
4. Re: Table inside a column
pzelenka00 Nov 25, 2011 9:54 AM (in response to pvito)Thanks. I finally used fixed TD height