You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Alexey Maksimov <al...@gmail.com> on 2006/04/26 14:05:47 UTC

Custom response writer

Hello

I need to generate something like this:

<script>
var s;
s = '<table>';
s += '<tr><td>some \"string\"</td></tr>';
....
s += '</table';
</script>

Well, I can write my own custom 'script' tag.

Is there any simple and correct way to generate that code with
standard dataTable tag? Like supplying custom ResponseWriter or
something like that?

Something like:
<m:my tag generating "s+='" prefix and "';" suffix>
	<t:dataTable>...</t:dataTable>
</m:my tag ..>

Or adding additional functionality to dataTable tag?
The questing is how to supply my own ResponseWriter to standard
components?

Best regards, Alexey.

Re: Custom response writer

Posted by Mike Kienenberger <mk...@gmail.com>.
t:dataList allows you to interate through a set of values like
dataTable.   You're free to output (or not output) anything you like
with each value.


On 4/26/06, Alexey Maksimov <al...@gmail.com> wrote:
> Hello
>
> I need to generate something like this:
>
> <script>
> var s;
> s = '<table>';
> s += '<tr><td>some \"string\"</td></tr>';
> ....
> s += '</table';
> </script>
>
> Well, I can write my own custom 'script' tag.
>
> Is there any simple and correct way to generate that code with
> standard dataTable tag? Like supplying custom ResponseWriter or
> something like that?
>
> Something like:
> <m:my tag generating "s+='" prefix and "';" suffix>
>         <t:dataTable>...</t:dataTable>
> </m:my tag ..>
>
> Or adding additional functionality to dataTable tag?
> The questing is how to supply my own ResponseWriter to standard
> components?
>
> Best regards, Alexey.
>