diff Lib/IMPL/Web/TT/Control.pm @ 107:0e72ad99eef7

Updated Web::TT
author wizard
date Thu, 13 May 2010 03:46:29 +0400
parents a5cb84374d40
children c6fb6964de4c
line wrap: on
line diff
--- a/Lib/IMPL/Web/TT/Control.pm	Wed May 12 17:52:12 2010 +0400
+++ b/Lib/IMPL/Web/TT/Control.pm	Thu May 13 03:46:29 2010 +0400
@@ -4,14 +4,20 @@
 
 use IMPL::Class::Property;
 
-our %CTOR = (
-	'IMPL::DOM::Node' => sub {
-		#TODO: Pass arguments
-	}
-);
+__PACKAGE__->PassThroughArgs;
 
 BEGIN {
 	public property template => prop_all;
+	public property id => prop_all;
+}
+
+my $nextId = 1;
+
+sub CTOR {
+	my ($this,%args) = @_;
+	
+	$this->template($args{template}) if $args{template};
+	$this->id($this->nodeName . '-' . $nextId++);
 }
 
 sub Render {