version 1.177, 2003/04/19 20:47:41
|
version 1.178, 2003/04/22 17:54:27
|
Line 169 sub real_handler {
|
Line 169 sub real_handler {
|
return OK; |
return OK; |
} |
} |
|
|
# See if there's only one map in the top-level... if so, |
# See if there's only one map in the top-level, if we don't |
# automatically display it |
# already have a filter... if so, automatically display it |
my $iterator = $navmap->getIterator(undef, undef, undef, 0); |
if (!defined($ENV{'form.filter'})) { |
my $depth = 1; |
my $iterator = $navmap->getIterator(undef, undef, undef, 0); |
$iterator->next(); |
my $depth = 1; |
my $curRes = $iterator->next(); |
$iterator->next(); |
my $sequenceCount = 0; |
my $curRes = $iterator->next(); |
my $sequenceId; |
my $sequenceCount = 0; |
while ($depth > 0) { |
my $sequenceId; |
if ($curRes == $iterator->BEGIN_MAP()) { $depth++; } |
while ($depth > 0) { |
if ($curRes == $iterator->END_MAP()) { $depth--; } |
if ($curRes == $iterator->BEGIN_MAP()) { $depth++; } |
|
if ($curRes == $iterator->END_MAP()) { $depth--; } |
if (ref($curRes) && $curRes->is_sequence()) { |
|
$sequenceCount++; |
if (ref($curRes) && $curRes->is_sequence()) { |
$sequenceId = $curRes->map_pc(); |
$sequenceCount++; |
|
$sequenceId = $curRes->map_pc(); |
|
} |
|
|
|
$curRes = $iterator->next(); |
|
} |
|
|
|
if ($sequenceCount == 1) { |
|
# The automatic iterator creation in the render call |
|
# will pick this up. We know the condition because |
|
# the defined($ENV{'form.filter'}) also ensures this |
|
# is a fresh call. |
|
$ENV{'form.filter'} = "$sequenceId"; |
} |
} |
|
|
$curRes = $iterator->next(); |
|
} |
|
|
|
if ($sequenceCount == 1) { |
|
# The automatic iterator creation in the render call |
|
# will pick this up. |
|
$ENV{'form.filter'} = "$sequenceId"; |
|
} |
} |
|
|
# renderer call |
# renderer call |