You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Randahl Fink Isaksen <ra...@rockit.dk> on 2005/07/20 21:56:20 UTC
How to iterate without generating table markup?
Let us say the reference #{cutomer.phoneNumbers} refers to a set of
phoneNumbers then how do you output these phone numbers WITHOUT
generating markup?
My problem is, if I use the h:dataTable tag it will generate table
markup in the output HTML, and I just want to iterate over the set and
output the raw phone number strings. h:dataTable will create something like
<table>
<tr><td>+45 12345678</td></tr>
<tr><td>+45 12345678</td></tr>
<tr><td>+45 12345678</td></tr>
</table>
But I am trying to create this
+45 12345678, +45 12345678, +45 12345678
I know that I am not supposed to iterate by using the often
JSF-incompatible JSTL tags, so could anyone give me a clue to what the
alternative is?
Any hints would be highly appreciated.
Randahl
Re: How to iterate without generating table markup?
Posted by Randahl Fink Isaksen <ra...@rockit.dk>.
Thanks - exactly what I was looking for - I simply had not noticed that
the x:dataList had a simple rendering mode. Great!
R.
Mathias Broekelmann wrote:
> Take a look at the x:datalist component:
>
> http://myfaces.apache.org/tomahawk/dataList.html
>
> Randahl Fink Isaksen schrieb:
>
>> Let us say the reference #{cutomer.phoneNumbers} refers to a set of
>> phoneNumbers then how do you output these phone numbers WITHOUT
>> generating markup?
>>
>> My problem is, if I use the h:dataTable tag it will generate table
>> markup in the output HTML, and I just want to iterate over the set
>> and output the raw phone number strings. h:dataTable will create
>> something like
>> <table>
>> <tr><td>+45 12345678</td></tr>
>> <tr><td>+45 12345678</td></tr>
>> <tr><td>+45 12345678</td></tr>
>> </table>
>>
>> But I am trying to create this
>>
>> +45 12345678, +45 12345678, +45 12345678
>>
>> I know that I am not supposed to iterate by using the often
>> JSF-incompatible JSTL tags, so could anyone give me a clue to what
>> the alternative is?
>>
>> Any hints would be highly appreciated.
>>
>> Randahl
>>
>>
>>
>>
>
>
Re: How to iterate without generating table markup?
Posted by Mathias Broekelmann <mb...@PSI.DE>.
Take a look at the x:datalist component:
http://myfaces.apache.org/tomahawk/dataList.html
Randahl Fink Isaksen schrieb:
> Let us say the reference #{cutomer.phoneNumbers} refers to a set of
> phoneNumbers then how do you output these phone numbers WITHOUT
> generating markup?
>
> My problem is, if I use the h:dataTable tag it will generate table
> markup in the output HTML, and I just want to iterate over the set and
> output the raw phone number strings. h:dataTable will create something like
> <table>
> <tr><td>+45 12345678</td></tr>
> <tr><td>+45 12345678</td></tr>
> <tr><td>+45 12345678</td></tr>
> </table>
>
> But I am trying to create this
>
> +45 12345678, +45 12345678, +45 12345678
>
> I know that I am not supposed to iterate by using the often
> JSF-incompatible JSTL tags, so could anyone give me a clue to what the
> alternative is?
>
> Any hints would be highly appreciated.
>
> Randahl
>
>
>
>
Re: How to iterate without generating table markup?
Posted by De...@ak.blm.gov.
Take a look at the c:forEach tag in JSTL and let Mr. FacesServlet go home
early for the day.