Generating static html pages?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Generating static html pages?

Thelliez
Is it possible to grab the html generated by Seaside to create static pages?

I am building long reports with Seaside. These reports are too slow to
render live. They can be generated in the background once a day.

Is it possible to dump the result of renderContentOn: in a static page? How?


Thanks,
Thierry
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Generating static html pages?

sebastianconcept@gmail.co
Of course it is. Seaside has a powerful renderer.

You can use it like this anytime:

pieceOfHtml := WARenderCanvas builder render:[:html|
yourRendereableReportThingy renderOn: html].

I used that in an abstract policy of sanitize like this:

SanitizePolicy>>renderClean
"Iterates the dom but only rendering the allowed elements and attributes."
^ WARenderCanvas builder render:[:html|
self renderCleanOn: html]


You can check the demo of sanitize in squeaksource.com if you want more detailed examples.



On Oct 23, 2010, at 2:01 PM, Thierry Thelliez wrote:

Is it possible to grab the html generated by Seaside to create static pages?

I am building long reports with Seaside. These reports are too slow to
render live. They can be generated in the background once a day.

Is it possible to dump the result of renderContentOn: in a static page? How?


Thanks,
Thierry
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Generating static html pages?

Thelliez
Ok, this is great. But one more thing, how do I grab all the html,
from <html> to </html>?

With WARenderCanvas builder render:[:html|    I am getting a fragment
of HTML  (div content as defined in renderContentOn: ).



Thierry
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Generating static html pages?

Philippe Marschall
2010/10/26 Thierry Thelliez <[hidden email]>:
> Ok, this is great. But one more thing, how do I grab all the html,
> from <html> to </html>?
>
> With WARenderCanvas builder render:[:html|    I am getting a fragment
> of HTML  (div content as defined in renderContentOn: ).

fullDocument: true

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside