You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jozsa Kristof <dy...@ond.vein.hu> on 2004/02/16 17:09:37 UTC

minor docs fix

tapestry/ComponentReference/ValidField.html

down at the examples, from the line
<bean name="fullNameValidator" class="org.apache.tapestry.valid.StringValidator">

the StringValidator property names should be 'minimumLength' ofc, not
'minimum'. Not that it's more then 10 sec to find out manually, just in case
anyone wants to correct it..

dyn
-- 
.Digital.Yearning.for.Networked.Assassination.and.Xenocide

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Tapestry page rendering

Posted by il...@dev.kck.ru.
Thanks a lot.
I tried it also but forgot to close an output stream, so received nothing 
after render.

Thanks.



"Mindbridge" <mi...@yahoo.com> 
16.02.2004 19:22
Please respond to
"Tapestry users" <ta...@jakarta.apache.org>


To
"Tapestry users" <ta...@jakarta.apache.org>
cc

Subject
Re: Tapestry page rendering






Sure:

// get the page to render
IPage page = cycle.getPage("...");
// render the page in the output stream 'outs'
page.render(new HTMLWriter(outs), cycle);

The result is in UTF-8 encoding.

In general all components and pages implement the IRender interface and 
have
the render() method.

If you want to get the result into a string, I would recommend:

IPage page = cycle.getPage("...");
StringWriter strwriter = new StringWriter();
PrintWriter prnwriter = new PrintWriter(strwriter);
page.render(new HTMLWriter(prnwriter), cycle);
prnwriter.close();
StringBuffer strbuf = strwriter.getBuffer();

-mb

----- Original Message ----- 
From: <il...@dev.kck.ru>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, February 16, 2004 6:59 PM
Subject: Tapestry page rendering


> Hello all.
> A question about page rendering in Tapestry. Please tell me if it's
> possible to render a page not into
> default output stream but into my own outputStream. I mean such a
> situation:
>
> I make myPage.java, myPage.page and myPage.html files. Than I need
> Tapestry to
> correctly parse all these , files put necessary values into html 
tempalte
> and gives me an
> OutputStream which contains properly formatted HTML-output. Or a
> StringBuffer it
> will be even better, so it will be possible to put this buffer with the
> data I need in any place in the program.
>
> Is it possible to do such a thing?
> Thanks a lot in advance.
>
> Evgen


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org



Re: Tapestry page rendering

Posted by Mindbridge <mi...@yahoo.com>.
Sure:

// get the page to render
IPage page = cycle.getPage("...");
// render the page in the output stream 'outs'
page.render(new HTMLWriter(outs), cycle);

The result is in UTF-8 encoding.

In general all components and pages implement the IRender interface and have
the render() method.

If you want to get the result into a string, I would recommend:

IPage page = cycle.getPage("...");
StringWriter strwriter = new StringWriter();
PrintWriter prnwriter = new PrintWriter(strwriter);
page.render(new HTMLWriter(prnwriter), cycle);
prnwriter.close();
StringBuffer strbuf = strwriter.getBuffer();

-mb

----- Original Message ----- 
From: <il...@dev.kck.ru>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, February 16, 2004 6:59 PM
Subject: Tapestry page rendering


> Hello all.
> A question about page rendering in Tapestry. Please tell me if it's
> possible to render a page not into
> default output stream but into my own outputStream. I mean such a
> situation:
>
> I make myPage.java, myPage.page and myPage.html files. Than I need
> Tapestry to
> correctly parse all these , files put necessary values into html tempalte
> and gives me an
> OutputStream which contains properly formatted HTML-output. Or a
> StringBuffer it
> will be even better, so it will be possible to put this buffer with the
> data I need in any place in the program.
>
> Is it possible to do such a thing?
> Thanks a lot in advance.
>
> Evgen


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Tapestry page rendering

Posted by il...@dev.kck.ru.
Hello all.
A question about page rendering in Tapestry. Please tell me if it's 
possible to render a page not into
default output stream but into my own outputStream. I mean such a 
situation:

I make myPage.java, myPage.page and myPage.html files. Than I need 
Tapestry to
correctly parse all these , files put necessary values into html tempalte 
and gives me an 
OutputStream which contains properly formatted HTML-output. Or a 
StringBuffer it
will be even better, so it will be possible to put this buffer with the 
data I need in any place in the program.

Is it possible to do such a thing?
Thanks a lot in advance.

Evgen