[Html-widget] Fwd: [rt.cpan.org #20313] embed() discards top level controls
Carl Franks
fireartist at gmail.com
Fri Jul 7 00:04:12 CEST 2006
I'm forwarding this to the list, as today's the first day of my
holidays, so I won't deal with it on principle ;)
If anyone wants to comment or take any other action via RT, it'd be
very much appreciated.
I'll be back hanging around in 3 weeks, 1 day and counting!
Cheers,
Carl
---------- Forwarded message ----------
From: Guest via RT <bug-HTML-Widget at rt.cpan.org>
Date: 06-Jul-2006 03:07
Subject: [rt.cpan.org #20313] embed() discards top level controls
To: undisclosed-recipients
Wed Jul 05 22:06:32 2006: Request 20313 was acted upon.
Transaction: Ticket created by guest
Queue: HTML-Widget
Subject: embed() discards top level controls
Broken in: 1.07
Severity: Important
Owner: Nobody
Requestors: jon.schutz at youramigo.com
Status: new
Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=20313 >
HTML-Widget-1.07, Perl 5.8.5, Centos 4 Linux
If you have a widget, add some elements, then embed some other forms,
the initially added elements fail to be rendered.
Example code:
----
#! /usr/bin/perl
use strict;
use warnings;
use HTML::Widget;
my $w = HTML::Widget->new->method('post')->action('/foo/bar');
$w->element( 'Textfield', 'age' )->label('Age')->size(3);
my $w2 = HTML::Widget->new('foo')->action('/foo');
# Add a standalone element to the containing w2
$w2->element( 'Textfield', 'allbymyself' )->label('All By Myself')->size(3);
#print $w2->process . "\n\n";
my $w3 = HTML::Widget->new('bar');
$w3->element( 'Textfield', 'baz' );
$w2->embed($w);
$w2->embed($w3);
my $f = $w2->process;
print $f;
---
Example output:
<form action="/foo" id="foo" method="post"><fieldset
id="foo_widget"><label for="foo_widget_age"
id="foo_widget_age_label">Age<input class="textfield"
id="foo_widget_age" name="age" size="3" type="text"
/></label></fieldset><fieldset id="foo_bar"><input class="textfield"
id="foo_bar_baz" name="baz" type="text" /></fieldset></form>
Note the absence of the 'allbymyself' element.
More information about the Html-widget
mailing list