<?
class frmForward1 extends MForm
{
		function __construct() 
		{
			parent::__construct('Forward (1)');
    		$this->eventHandler();
		}

		function CreateFields()
		{
            $variables = $this->manager->request->getParameters();
            foreach($variables as $key=>$var)
            {
               $v .= "[$key = $var]"; 
            } 
            $fields = array(
                new MLabel("The forward method allow to pass the execution flow to another handler, without interact to the browser. The process happens only at server-side."),
                new MLabel("The request variables: " . $v),
                new MTextField('avalue','','A Value to forward2')
            );
            $this->setFields($fields);
			$buttons = array(
				new MButton('btnTo2c','Click to Forward(2) with ClearContent'),
				new MButton('btnTo2a','Click to Forward(2) with AppendContent')
			);
			$this->setButtons($buttons);
		}

		function btnTo2c_click()
		{
            $go = $this->manager->getActionURL('example','forward2','clear');
            $this->page->forward($go);
		}

		function btnTo2a_click()
		{
            $go = $this->manager->getActionURL('example','forward2','append');
            $this->page->forward($go);
		}
}
?>
