diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page | 21 | ||||
| -rw-r--r-- | tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php | 15 | 
2 files changed, 30 insertions, 6 deletions
| diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page index c20e810b..87522f72 100644 --- a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.page @@ -1,22 +1,31 @@  <com:TContent ID="Content">
 +	<h1>TCallback Demo</h1>
  	<com:TClientScript UsingPradoScripts="ajax" />
 -	<com:TActiveControl id="control1" 
 -		ClientSide.CausesValidation="false"
 -		ClientSide.OnSuccess="Logger.info('result:'+result)" />
 +	<com:TCallback id="control1" 
 +		OnCallback="control1onCallback">
 +		<com:TButton id="button2" Text="Hello" Visible="false"/>
 +	</com:TCallback>
  	<com:TTextBox id="text1" />
 -	<com:TRequiredFieldValidator
 -		ControlToValidate="text1"
 -		ErrorMessage="*" />
 +
  	<com:TCheckBoxList>
  		<com:TListItem Text="One" />
  		<com:TListItem Text="Two" />
  	</com:TCheckBoxList>
 +
 +	<com:TPanel id="panel2" Visible="false">
 +		asdad <com:TCheckBox id="checkbox1" />
 +	</com:TPanel>
 +
 +	<input type="hidden" name="PRADO_CALLBACK_TARGET" value="<%= $this->control1->UniqueID %>" />
 +
  	<com:TButton id="button1" Text="Submit" CausesValidation="false" />
  	<script>
  		Event.observe("<%= $this->button1->ClientID %>", "click", function(event)
  		{
  			<%= $this->control1->CallbackReference %>	
 +		
  			Event.stop(event);
  		});
 +		
  	</script>
  </com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php new file mode 100644 index 00000000..43d93d30 --- /dev/null +++ b/tests/FunctionalTests/features/protected/pages/ActiveControls/ActiveControl.php @@ -0,0 +1,15 @@ +<?php
 +/*
 + * Created on 2/05/2006
 + */
 + 
 +class ActiveControl extends TPage
 +{
 +	public function control1onCallback($sender, $param)
 +	{
 +		$this->button2->setVisible(true);
 +		$this->button2->setText("Time is ".time());
 +		$this->control1->render($param->getOutput());
 +	}
 +}
 +?>
 | 
