$formAction = getCallBack(); // Create our nifty new PageDisplay object // The constructor acts like our old loadData() $pageDisplay = new page_SeriesEdit('', null, $formAction, $stateVariables[SERIES_ID]); break; case PAGE_SERIESLIST: default: // Create our nifty new PageDisplay object // The constructor acts like our old loadData() $pageDisplay = new page_SeriesList('', null, ''); // our script is now responsible to know about the links of the // application. So it creates an array of links for the template // to use. $newValues = $stateVariables; $newValues[PAGE] = PAGE_SERIESEDIT; $links['edit'] = getCallBack($newValues, SERIES_ID); $pageDisplay->setLinks($links); break; } // be sure to load the form values if a form was submitted if (isset($_REQUEST['submit'])) { $pageDisplay->loadFromForm(); } /* * Process the Data */ // only need to processData() if this was a form Submission if (isset($_REQUEST['submit'])) { // if the form data was valid if ($pageDisplay->isDataValid()) { // then process the data
/** * function loadSeriesList * <pre> * This routine loads the SeriesList page in the pageDisplay Object. * </pre> * @return [void] */ function loadSeriesList() { global $pageDisplay; global $stateVariables; // Create our nifty new PageDisplay object // The constructor acts like our old loadData() $pageDisplay = new page_SeriesList('', null, ''); // our script is now responsible to know about the links of the // application. So it creates an array of links for the template // to use. $newValues = $stateVariables; $newValues[PAGE] = PAGE_SERIESEDIT; $links['edit'] = getCallBack($newValues, SERIES_ID); $pageDisplay->setLinks($links); }