47 |
my @w; |
my @w; |
48 |
|
|
49 |
while ( my $u = $s->next ) { |
while ( my $u = $s->next ) { |
50 |
warn "# u = ",dump( $u ); |
my $w = Strix::View::User->new( %{ $u } ); |
|
my $w = Strix::View::User->new( |
|
|
#%{ unbless( $u ) }, # FIXME this is cludge |
|
|
%{ $u } # much better :-) |
|
|
); |
|
51 |
$w->_fey( $u ); |
$w->_fey( $u ); |
52 |
warn "# w = ",dump( $w ); |
warn "# w = ",dump( $w ) if $self->debug; |
53 |
push @w, $w; |
push @w, $w; |
54 |
} |
} |
55 |
|
|
56 |
while ( 1 ) { |
while ( 1 ) { |
57 |
my $form = join('<hr/>', map { $_->process($f) } @w ); |
|
58 |
|
warn "# got $#w elements: ",dump( map { $_->id } @w ); |
59 |
|
warn "<<< GOT REQUEST ",dump( $f ); |
60 |
|
|
61 |
|
warn "does last element have id? ",dump( $w[$#w]->id ); |
62 |
|
|
63 |
|
if ( $w[ $#w ]->_fey ) { |
64 |
|
warn "+++ added new widget\n"; |
65 |
|
push @w, Strix::View::User->new( render_as => 'edit' ); |
66 |
|
} |
67 |
|
|
68 |
|
my $form = join('<hr/>', map { $_->process($f) || '[deleted]' } @w ); |
69 |
my $doc = Continuity::Widget::DomNode->create( |
my $doc = Continuity::Widget::DomNode->create( |
70 |
html => [ |
html => [ |
71 |
head => [ |
head => [ |
72 |
link => { rel=>"stylesheet", href=>"form.css", type=>"text/css" } |
link => { rel=>"stylesheet", href=>"/static/form.css", type=>"text/css" } |
73 |
], |
], |
74 |
body => [ |
body => [ |
75 |
h1 => [ 'Strix::User' ], |
h1 => [ 'Strix::User' ], |
76 |
form => { method=>'post' } => [ |
form => { method=>'post' } => [ |
77 |
$form |
$form, |
78 |
], |
], |
79 |
], |
], |
80 |
] |
] |
84 |
$req->next; |
$req->next; |
85 |
|
|
86 |
$f = { $req->params }; |
$f = { $req->params }; |
|
warn "...here we go again..."; |
|
87 |
} |
} |
88 |
|
|
89 |
warn "NO WAY OUT!"; |
warn "NO WAY OUT!"; |