You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Todd Nine <to...@gmail.com> on 2007/02/08 19:05:50 UTC

Using t:columns in a static row table

Hi all,
  I'm trying to write a search results page in JSF.  I have everything done
except the paging commands, and I'm a bit stuck on this part.  I would like
to use t:columns to display the page numbers and commandLinks.  Is it
possible to use t:columns without needing an empty array for the
h:dataTable?  In other words, I need my output to be

<table>
  <tr>
     <td>element 0</td><td>element 2</td> etc...
   </tr>
</table>

However I have no need for more rows that an single row.  Is there a better
way to do this and the following?

    </h:dataTable> <h:dataTable var="foo" value="#{searchBean.singleElement
}">
                <t:columns var="page" value="#{searchBean.searchPages}">
                    <h:outputText value="#{page.displayNumber
}"></h:outputText>


                </t:columns>
            </h:dataTable>

where swearchBean.singleElement contains a single Index of searchPages?

Thanks,
Todd

Re: Using t:columns in a static row table

Posted by Todd Nine <to...@gmail.com>.
Scratch that, I just figured it out.  I used t:datalist instead.



On 2/8/07, Todd Nine <to...@gmail.com> wrote:
>
> Hi all,
>   I'm trying to write a search results page in JSF.  I have everything
> done except the paging commands, and I'm a bit stuck on this part.  I would
> like to use t:columns to display the page numbers and commandLinks.  Is it
> possible to use t:columns without needing an empty array for the
> h:dataTable?  In other words, I need my output to be
>
> <table>
>   <tr>
>      <td>element 0</td><td>element 2</td> etc...
>    </tr>
> </table>
>
> However I have no need for more rows that an single row.  Is there a
> better way to do this and the following?
>
>     </h:dataTable> <h:dataTable var="foo" value="#{
> searchBean.singleElement}">
>                 <t:columns var="page" value="#{searchBean.searchPages}">
>                     <h:outputText value="#{page.displayNumber
> }"></h:outputText>
>
>
>                 </t:columns>
>             </h:dataTable>
>
> where swearchBean.singleElement contains a single Index of searchPages?
>
> Thanks,
> Todd
>