posted 17 years ago
Hello All,
I don't know what I am doing wrong here but for some reason, I am not able to list Table and a Calendar on the same row (next to each other). I have created a outer table using dataTable to have two columns (one for Table and the other for Calendar). Any input will be appreciated.
FYI: I am using Facelets and MyFaces.
Thanks,
Pinal
<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:t="http://myfaces.apache.org/tomahawk">
<ui:composition template="/WEB-INF/layout/basic_layout.xhtml">
<ui:define name="content"><h:form id="foodForm">
<t:dataTable id="outerTable" border="10">
<t:column>
<t:dataTable id="foodTable" border="1"
value="#{foodBean.foodTableInfo}" var="food" rendered="true">
<t:column>
<f:facet name="header">
<t:outputText value="Item" id="h1" />
</f:facet>
<t:outputText value="#{food.item}"></t:outputText>
</t:column>
<t:column>
<f:facet name="header">
<t:outputText value="Calories" id="h2" />
</f:facet>
<t:outputText value="#{food.calories}"></t:outputText>
</t:column>
<t:column>
<f:facet name="header">
<t:outputText value="Fat(Calories)" id="h2" />
</f:facet>
<t:outputText value="#{food.fatCalories}"></t:outputText>
</t:column>
<t:column>
<f:facet name="header">
<t:outputText value="Portion" id="h2" />
</f:facet>
<t:outputText value="#{food.portion}"></t:outputText>
</t:column>
</t:dataTable>
</t:column>
<t:column>
<t:inputCalendar currentDayCellClass="currentDayCell"
dayCellClass="dayCell"></t:inputCalendar>
</t:column>
</t:dataTable>
</h:form></ui:define>
</ui:composition>
</html>