IncrementOffset(); throw $objExc; } // Record Method Callbacks $this->strSetEditPanelMethod = $strSetEditPanelMethod; $this->strCloseEditPanelMethod = $strCloseEditPanelMethod; // Setup the Template $this->Template = 'PaypalTransactionListPanel.tpl.php'; // Instantiate the Meta DataGrid $this->dtgPaypalTransactions = new PaypalTransactionDataGrid($this); // Style the DataGrid (if desired) $this->dtgPaypalTransactions->CssClass = 'datagrid'; $this->dtgPaypalTransactions->AlternateRowStyle->CssClass = 'alternate'; // Add Pagination (if desired) $this->dtgPaypalTransactions->Paginator = new QPaginator($this->dtgPaypalTransactions); $this->dtgPaypalTransactions->ItemsPerPage = 8; // Use the MetaDataGrid functionality to add Columns for this datagrid // Create an Edit Column $this->pxyEdit = new QControlProxy($this); $this->pxyEdit->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'pxyEdit_Click')); $this->dtgPaypalTransactions->MetaAddEditProxyColumn($this->pxyEdit, 'Edit', 'Edit'); // Create the Other Columns (note that you can use strings for paypal_transaction's properties, or you // can traverse down QQN::paypal_transaction() to display fields that are down the hierarchy) $this->dtgPaypalTransactions->MetaAddColumn('Id'); $this->dtgPaypalTransactions->MetaAddColumn(QQN::PaypalTransaction()->Order); $this->dtgPaypalTransactions->MetaAddColumn('CorrelationId'); $this->dtgPaypalTransactions->MetaAddColumn('TransactionId'); $this->dtgPaypalTransactions->MetaAddColumn('PpToken'); $this->dtgPaypalTransactions->MetaAddColumn('PayerId'); $this->dtgPaypalTransactions->MetaAddColumn('PayerStatus'); $this->dtgPaypalTransactions->MetaAddColumn('PaymentStatus'); $this->dtgPaypalTransactions->MetaAddColumn('AckReturned'); $this->dtgPaypalTransactions->MetaAddColumn('ApiAction'); $this->dtgPaypalTransactions->MetaAddColumn('TimeStamp'); $this->dtgPaypalTransactions->MetaAddColumn('ApiVersion'); $this->dtgPaypalTransactions->MetaAddColumn('Messages'); $this->dtgPaypalTransactions->MetaAddColumn('Amount'); $this->dtgPaypalTransactions->MetaAddColumn('PpFee'); $this->dtgPaypalTransactions->MetaAddColumn(QQN::PaypalTransaction()->PaymentMethod); // Setup the Create New button $this->btnCreateNew = new QButton($this); $this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('PaypalTransaction'); $this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click')); } public function pxyEdit_Click($strFormId, $strControlId, $strParameter) { $strParameterArray = explode(',', $strParameter); $objEditPanel = new PaypalTransactionEditPanel($this, $this->strCloseEditPanelMethod, $strParameterArray[0]); $strMethodName = $this->strSetEditPanelMethod; $this->objForm->$strMethodName($objEditPanel); } public function btnCreateNew_Click($strFormId, $strControlId, $strParameter) { $objEditPanel = new PaypalTransactionEditPanel($this, $this->strCloseEditPanelMethod, null); $strMethodName = $this->strSetEditPanelMethod; $this->objForm->$strMethodName($objEditPanel); } } ?>