migrate Wizard getForm to FormBuilder

This commit is contained in:
Doug Bell 2011-02-16 17:11:11 -06:00
parent 2170509c0f
commit 37f392b4c8
4 changed files with 59 additions and 54 deletions

View file

@ -18,7 +18,7 @@ WebGUI::Wizard -- Generate wizards
# Show a form for the first step
sub www_step1 {
my ( $self ) = @_;
my $f = $self->getForm; # Get a WebGUI::HTMLForm
my $f = $self->getForm; # Get a WebGUI::FormBuilder
$f->text( name => "user" );
return $f->print;
}
@ -244,14 +244,14 @@ sub getCurrentStep {
=head2 getForm ( [step] )
Get a WebGUI::HTMLForm object for a given step, defaulting to the current step.
Get a WebGUI::FormBuilder object for a given step, defaulting to the current step.
=cut
sub getForm {
my ( $self, $step ) = @_;
$step ||= $self->getCurrentStep;
my $form = WebGUI::HTMLForm->new( $self->session,
my $form = WebGUI::FormBuilder->new( $self->session,
action => $self->getStepUrl( $step ),
);
return $form;