Subversion-Projekte lars-tiefland.prado

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
Prado::using('System.Collections.TDummyDataSource');
4
 
5
class Sample4 extends TPage
6
{
7
	public function onLoad($param)
8
	{
9
		parent::onLoad($param);
10
		if(!$this->IsPostBack)
11
		{
12
			// use a dummy data source to create 3 repeater items
13
			$this->Repeater->DataSource=new TDummyDataSource(3);
14
			$this->Repeater->dataBind();
15
		}
16
	}
17
 
18
	public function itemCreated($sender,$param)
19
	{
20
		// $param->Item refers to the newly created repeater item
21
		$param->Item->Style="width:300px; margin:10px; margin-left:0px";
22
	}
23
 
24
	public function buttonClicked($sender,$param)
25
	{
26
		$links=array();
27
		foreach($this->Repeater->Items as $textBox)
28
		{
29
			if($textBox->Text!=='')
30
				$links[]=$textBox->Text;
31
		}
32
		$this->Repeater2->DataSource=$links;
33
		$this->Repeater2->dataBind();
34
	}
35
}
36
 
37
?>