Mercurial > pub > Impl
view Lib/Schema/Form/Container.pm @ 144:b56ebc31bf18
Empty nodes no more created while transforming a post request to the DOM document
minor speed improvements to the object CTOR caching
Added support for a secure processing (and 'laundering' ) a CGI parameters
Many minor fixes
author | wizard |
---|---|
date | Tue, 13 Jul 2010 02:05:38 +0400 |
parents | 16ada169ca75 |
children | 4267a2ac3d46 |
line wrap: on
line source
package Schema::Form::Container; use Form::Container; use Common; use base qw(Schema::Form::Item); BEGIN { DeclareProperty Children => ACCESS_READ; } sub CTOR { my ($this,%args) = @_; $this->SUPER::CTOR(@args{qw(Name isMulti Filters)}); $this->{$Children} = []; } sub AddChild { my ($this,$child) = @_; not grep { $_->Name eq $child->Name } $this->Children or die new Exception("The item already exists",$child->Name); push @{$this->{$Children}},$child; } sub FindChild { my ($this,$name) = @_; my @result = grep { $_->Name eq $name} $this->Children; return $result[0]; } sub Dispose { my ($this) = @_; delete $this->{$Children}; $this->SUPER::Dispose; } 1;