sartaj singh Sartaj Singh

Basics

Page Object

What is page object:-

Page Object is accessible in application and any where in project. Page object is created by Sartaj PHP and it is access with $page. Page class provide us event driven mechanism to create application. Best way to develop application as module type rather then OOP because its more friendly with PHP and easy to understand. For Example if you handle detail event you can write code:-

if($page->isevent){
switch($page->sact){
case "show" :{
$blngetFront = true;
$formNo = 2;
break;
}
case "detail" :{
// detail event handler
$blngetFront = true;
$formNo = 1;
break;
}

}

}

So you can easily check which event is occured in Application. Other Status which you can check

$page->isinsert,$page->issubmit,$page->isupdate,$page->isdelete,$page->isview,$page->isnew etc. This all events provide inbuilt. You can use this to create application.This occurred according to below:-

  1. HTML Form submit to application:- submit event,insert event
  2. HTML Form submit to application after View Event:- submit,update event
  3. URL Base Events: delete,view and event(User Type Event you can create your own events)
  4. No any other Event: new event occurred


You can fire event of application with URL use getEventPath("delete","1"); You can get URL from the function and this dynamic URL. so your application has ability to reuse in any other project.