h or t dataTable not showing up

Could someone find the mistake in the following snippet of code....the table below is not being rendered to the screen, even the view source of the page does not show the table at all...

<f:view>

<h:form id="form1">

<h:dataTable var="dt1" rendered="true">

<h:column>

<ui:label id="label1" text="blabla1" />

<ui:label id="label2" text="blabla2" />

</h:column>

</h:dataTable>

</h:form>

</f:view>

Thanks

-MS

[543 byte] By [msanyala] at [2007-10-3 0:57:07]
# 1
I assume you want to show static content? Better use h:panelGrid in this case.If you want to use h:dataTable anyway, check http://balusc.xs4all.nl/srv/dev-j2p-dat.html how to use it.
BalusCa at 2007-7-14 17:52:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

ok .. after some experimenting...this is what I got (see my comments):

<h:form id="form99">

<div>

<t:dataTable var="row" renderedIfEmpty="true" preserveDataModel="true" width="100%">

<t:column>

<f:facet name="header">

<h:outputText value="blabla1:"/>// THIS SHOWS UP

</f:facet>

<h:inputText value="bla bla 2" readonly="true" disabled="true" /> // THIS DOES NOT SHOW UP

</t:column>

</t:dataTable>

</div>

</h:form>

....so inside of a <f:facet> it is showing up but anytihng outside the <f:facet> is not showing up ? now can anyone tell me why it is behaving so wierd? Eventually I am gonna have dyamic data but it should work with static data as well right?

Thanks

-MS

PS: BalusC, i did visit the link! Looks like my usage of dataTables is right. Lemme know if u find anything amiis.

msanyala at 2007-7-14 17:52:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

..I tried some more..and I dont think its the <f:facet> which is rendering it. because I tried to put the other h:input tag insde another facet and that did not work but the first facet still worked...the more I am looking into this problem...the more confused I am getting...I will not leave it till I have solved it....waiting for the enlightenment..... :)

Thanks

-MS

msanyala at 2007-7-14 17:52:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

The facet is rendered because that is ultimately a table header. The rest of the data inside the dataTable isn't being rendered because you haven't specified a value.

See the TLD docs for h:dataTable here (I'm sure it's very similar for t:dataTable):

http://java.sun.com/javaee/javaserverfaces/1.1/docs/tlddocs/index.html

rlubkea at 2007-7-14 17:52:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
hmm... u r right...it works like a charm..now I am having other layout issues...but I shud be able to fix those on my own :)Thanks!-MS
msanyala at 2007-7-14 17:52:41 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...