finished converting view() methods to have a prepareView() companion.
This commit is contained in:
parent
6c4ae02f34
commit
bb263b4777
12 changed files with 208 additions and 28 deletions
|
|
@ -183,6 +183,23 @@ sub _trim {
|
|||
return $str;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 prepareView ( )
|
||||
|
||||
See WebGUI::Asset::prepareView() for details.
|
||||
|
||||
=cut
|
||||
|
||||
sub prepareView {
|
||||
my $self = shift;
|
||||
$self->SUPER::prepareView();
|
||||
my $template = WebGUI::Asset::Template->new($self->session, $self->get("templateId"));
|
||||
$template->prepare;
|
||||
$self->{_viewTemplate} = $template;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 view ( )
|
||||
|
||||
|
|
@ -208,7 +225,7 @@ sub view {
|
|||
push(@locs, $self->_getLocationData($array[$i]));
|
||||
}
|
||||
$var->{'ourLocations.loop'} = \@locs;
|
||||
return $self->processTemplate($var, $self->get("templateId"));
|
||||
return $self->processTemplate($var, undef, $self->{_viewTemplate});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue