webtier@glassfish.java.net

Re: [webtier] <h:column> alignment is not working

From: Jeffrey Blattman <jeffrey.blattman_at_gmail.com>
Date: Wed, 08 Jul 2009 07:20:32 -0700

your code renders a 1-column table as expected. you have on column tag
inside your table. if you really want a table where the number of
columns is dynamic depending on your data set, you could build the table
manually in your bean.

could you make do with something simpler, like

<h:panelGrid columns="#{items.length}">
<c:forEach var="item" items="#{items}">
<h:outputText value="#{item.name}"/>
</c:forEach>
</h:panelGrid>

using ui:repeat would be preferable to c:forEach, if you are using facelets.

On 7/8/09 5:35 AM, webtier_at_javadesktop.org wrote:
> here is the sample code.
> <h:dataTable id="data" ... value="#{itemBean.topList}" var="item"> <h:column> <h:outputText value="#{item.name}"/> </h:column> </h:dataTable>
>
> The output is like this.
> A
> B
> C
> D
>
> I want to align this output as A B C D.
>
> Please suggest me on this solution.
> [Message sent by forum member 'anilv' (anilv)]
>
> http://forums.java.net/jive/thread.jspa?messageID=354631
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>