/** @return PntRequestHandler appropriate to handle a request. 
	 * First a class named <pntType><pntHandler> is tried. 
	 * If it can not be included, Object<pntHandler> will be used. 
	 * If pntHandler param is missing in $requestData a default will be used, see implementation fo this method.
	 * A special case is if pntHandler=(MtoN)PropertyPage: then <pntType>Property<pntProperty>Page is tried first, 
	 * @param array $requestData associative, of string like $_REQUEST, 
	 *      used to decide which class to include and instantiate, 
	 *      and passed to the PntRequestHandler as the request data.
	 * @param string $dir appears to be ignored.  $thisfunction getRequestHandler(->getDir() will be used.
	 * For each class name inclusion is first tried from $this->getDir(), 
	 * 	    If the class is not found, a class from the classes root folder is tried
	 * @throws PntValidationException is no class could be included
	 */
	function getRequestHandler($requestData, $dir=null) {
		if (!$dir) $dir = $this->getDir();
		$id = isSet($requestData["id"]) ? $requestData["id"] : null;
		$specifiedHandler = $handler = isSet($requestData["pntHandler"])
			?  $requestData["pntHandler"] : null;
		$property = ucFirst(isSet($requestData["pntProperty"]) ? $requestData["pntProperty"] : '');
		$type = isSet($requestData["pntType"]) ? $requestData["pntType"] : null;
		if ($handler=='PropertyPage' || $handler=='MtoNPropertyPage')
			$handler = "Property$property".'Page';
		elseif (!$handler) {  //no pntHandler param, use default:
			if ($property == 'pntList')
				$handler = 'IndexPage';
			elseif ($id !== null)
				$handler = 'EditDetailsPage';
			else
				$handler = 'IndexPage';
			$specifiedHandler = $handler;
		}

		$attempted = array();
		$info = null;
		$handlerClass = $type
			? $this->tryUseHandlerClass("$type$handler", $attempted)
			: null;
		if (!$handlerClass && $property) {
			//there is no specific handler for this type and property, try type-handler
			$handler = $specifiedHandler;
			$handlerClass = $this->tryUseHandlerClass("$type$handler", $attempted);
		}
		if (!$handlerClass) 
			//there is no specific handler for this type, try generic handler from same dir
			$handlerClass = $this->controller->tryUseGenericHandlerClass($this, $requestData, $handler, $attempted);

		if (!$handlerClass) {
			$name = $this->getName();
			$errorMessage = "$name - handler not found: $handler, tried: <BR>\n";
			$errorMessage .= $this->getHandlersTriedString($attempted);
			throw new PntValidationException($errorMessage);
		}
//  print "<BR>Handler: $handlerClass $included";
		if (!is_subclassOr($handlerClass, 'PntRequestHandler'))
			throw new PntValidationException($handlerClass. ' does not inherit from PntRequestHandler');
		$result = new $handlerClass($this, $requestData);

		if ($this->getDebugMode() == 'verbose') {
			$info = 'Handlers tried<BR>(one of last two succeeded): ';
			$info .= $this->getHandlersTriedString($attempted);
			$result->setInformation($info);
		}
		return $result;
	}