[Bio] / WebApplication / WebComponent.pm Repository:
ViewVC logotype

Diff of /WebApplication/WebComponent.pm

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

revision 1.6, Mon Aug 2 12:14:47 2010 UTC revision 1.7, Wed Sep 29 16:21:51 2010 UTC
# Line 38  Line 38 
38  =cut  =cut
39    
40  sub new {  sub new {
41      my ($class, $application, $id) = @_;      my ($class, $application, $id, $type) = @_;
42    
43      # check application      # check application
44      unless (ref $application and $application->isa("WebApplication")) {      unless (ref $application and $application->isa("WebApplication")) {
# Line 55  Line 55 
55                   'css'         => undef,                   'css'         => undef,
56                   'svURL'       => $sv_url,                   'svURL'       => $sv_url,
57                   'sigleton'    => 0,                   'sigleton'    => 0,
58                     '_type'       => $type
59                 };                 };
60      bless $self, $class;      bless $self, $class;
61    
# Line 96  Line 97 
97  =cut  =cut
98    
99  sub id {  sub id {
100    return $_[0]->{'id'};    my ($self, $id) = @_;
101      if (defined($id)) {
102        $self->{'id'} = $id;
103        $self->{'application'}->{'components'}->{$self->{_type}}->[$id] = $self;
104        $self->{'application'}->{'component_index'}->{$self->{_id}} = $self;
105      }
106      return $self->{'id'};
107  }  }
108    
109    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3