more changes related to chunked output

This commit is contained in:
JT Smith 2006-01-30 17:51:03 +00:00
parent 81789c2275
commit 82156de83c
3 changed files with 36 additions and 0 deletions

View file

@ -85,6 +85,10 @@ sub definition {
fieldType=>'selectList',
defaultValue=>[$session->config->get("defaultTemplateParser")]
},
headBlock=>{
fieldType=>"codearea",
defaultValue=>undef
},
namespace=>{
fieldType=>'combo',
defaultValue=>undef
@ -245,6 +249,21 @@ sub indexContent {
}
#-------------------------------------------------------------------
=head2 prepare ( )
This method sets the tags from the head block parameter of the template into the HTML head block in the style. You only need to call this method if you're using the HTML streaming features of WebGUI, like is done in the prepareView()/view()/www_view() methods of WebGUI assets.
=cut
sub prepare {
my $self = shift;
$self->{_prepared} = 1;
$self->session->style->setRawHeadTags($self->get("headBlock"));
}
#-------------------------------------------------------------------
=head2 process ( vars )
@ -260,6 +279,7 @@ A hash reference containing template variables and loops. Automatically includes
sub process {
my $self = shift;
my $vars = shift;
$self->prepare unless ($self->{_prepared});
return $self->getParser($self->session, $self->get("parser"))->process($self->get("template"), $vars);
}

View file

@ -393,6 +393,21 @@ sub moveCollateralUp {
$self->session->db->commit;
}
#-------------------------------------------------------------------
=head2 prepareView ( )
See WebGUI::Asset::prepareView() for details.
=cut
sub prepareView {
my $self = shift;
my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId"));
$template->prepare;
}
#-------------------------------------------------------------------
sub processPropertiesFromFormPost {
my $self = shift;

View file

@ -214,6 +214,7 @@ if ($self->session->user->isInGroup(2)) {
}
WebGUI::Macro::process(\$output);
my $macroHeadTags = $self->generateAdditionalHeadTags();
WebGUI::Macro::process(\$macroHeadTags);
$output =~ s/\<\!--morehead--\>/$macroHeadTags/;
if ($self->session->errorHandler->canShowDebug()) {
$output .= $self->session->errorHandler->showDebug();