sorting the FieldType options.

This commit is contained in:
Matthew Wilson 2005-11-28 14:34:12 +00:00
parent 69c5836f2d
commit 677887cc1f

View file

@ -19,6 +19,7 @@ use base 'WebGUI::Form::Control';
use WebGUI::Form::SelectList; use WebGUI::Form::SelectList;
use WebGUI::International; use WebGUI::International;
use WebGUI::Session; use WebGUI::Session;
use Tie::IxHash;
=head1 NAME =head1 NAME
@ -138,6 +139,7 @@ Renders a question selector asking the user where they want to go.
sub toHtml { sub toHtml {
my $self = shift; my $self = shift;
my %options; my %options;
tie %options, "Tie::IxHash";
foreach my $type (@{$self->{types}}) { foreach my $type (@{$self->{types}}) {
my $class = "WebGUI::Form::".ucfirst($type); my $class = "WebGUI::Form::".ucfirst($type);
my $cmd = "use ".$class; my $cmd = "use ".$class;