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
|
|
@ -112,6 +112,23 @@ sub getEditForm {
|
|||
return $tabform;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=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 purge ( )
|
||||
|
||||
|
|
@ -149,7 +166,7 @@ sub view {
|
|||
#This is an example of debugging code to help you diagnose problems.
|
||||
#WebGUI::ErrorHandler::warn($self->get("templateId"));
|
||||
|
||||
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