/[Frey]/trunk/lib/Frey/ObjectBrowser.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/ObjectBrowser.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 68 by dpavlin, Wed Jul 9 13:12:03 2008 UTC revision 82 by dpavlin, Thu Jul 10 15:29:01 2008 UTC
# Line 26  sub process_links { Line 26  sub process_links {
26  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
27  use Data::Structure::Util qw(unbless);  use Data::Structure::Util qw(unbless);
28    
29    
30  #method 'html' => positional(  #method 'html' => positional(
31  #       isa => 'Continuity::RequestHolder',  #       isa => 'Continuity::RequestHolder',
32  #       required => 1,  #       required => 1,
# Line 46  sub html { Line 47  sub html {
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 } );
51                  my $w = Strix::View::User->new(                  $w->_fey( $u );
52                          # FIXME this is cludge                  warn "# w = ",dump( $w ) if $self->debug;
                         unbless( $u )  
                 );  
                 warn "# w = ",dump( $w );  
53                  push @w, $w;                  push @w, $w;
54          }          }
55    
56          while ( 1 ) {          while ( 1 ) {
57                  my $html = join('<hr/>', map { $_->process($f) } @w );          
58                  $req->print( $html );                  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(
70                            html => [
71                                    head => [
72                                            link  => { rel=>"stylesheet", href=>"/static/form.css", type=>"text/css" }
73                                    ],
74                                    body => [
75                                            h1 => [ 'Strix::User' ],
76                                            form => { method=>'post' } => [
77                                                    $form,
78                                            ],
79                                    ],
80                            ]
81                    );
82    
83                    $req->print( $doc->to_string );
84                  $req->next;                  $req->next;
85    
86                    $f = { $req->params };
87          }          }
88    
89          warn "NO WAY OUT!";          warn "NO WAY OUT!";

Legend:
Removed from v.68  
changed lines
  Added in v.82

  ViewVC Help
Powered by ViewVC 1.1.26