Beispiel #1
0
 protected function Form_Create()
 {
     // Define the DataGrid
     $this->dtgPersons = new QHtmlTable($this);
     // Define Columns
     // This first example uses a callback to draw the column, which is the most versatile way of drawing a column.
     // In other examples, we will describe other column types that let you draw some standard column types.
     $col = $this->dtgPersons->CreateCallableColumn('First Name', [$this, 'dtgPerson_FirstName_Render']);
     $col->CellStyler->Width = 200;
     // style for the 'td' tag of the column
     $col = $this->dtgPersons->CreateCallableColumn('Last Name', [$this, 'dtgPerson_LastName_Render']);
     $col->CellStyler->FontBold = true;
     // style for the 'td' tag of the column
     // Specify the local Method which will actually bind the data source to the datagrid.
     // In order to not over-bloat the form state, the datagrid will use the data source only when rendering itself,
     // and then it will proceed to remove the data source from memory.  Because of this, you will need to define
     // a "data binding" method which will set the datagrid's data source.  You specify the name of the method
     // here.  The framework will be responsible for calling your data binding method whenever the datagrid wants
     // to render itself.
     $this->dtgPersons->SetDataBinder('dtgPersons_Bind');
     // Update the styles of all the rows, or for just specific rows
     // (e.g. you can specify a specific style for the header row or for alternating rows)
     // Note that styles are hierarchical and inherit from each other.  For example, the default RowStyle
     // sets the FontSize as 12px, and because that attribute is not overridden in AlternateRowStyle
     // or HeaderRowStyle, both those styles will use the 12px Font Size.
     // While there are a variety of ways to style tables QCubed, the easiest and most versatile is to use css
     // classes. These are defined at the top of the intro.tpl.php file in this example.
     $this->dtgPersons->HeaderRowCssClass = 'header-row';
     $this->dtgPersons->RowCssClass = 'row';
     $this->dtgPersons->AlternateRowCssClass = 'alt-row';
 }
 protected function Form_Create()
 {
     $this->dtg = new QHtmlTable($this);
     $this->dtg->SetDataBinder('BindData');
     $col = $this->dtg->CreateCallableColumn('Link', [$this, 'dtg_LinkRender']);
     $col->HtmlEntities = false;
     $col = $this->dtg->CreateCallableColumn('Button', [$this, 'dtg_ButtonRender']);
     $col->HtmlEntities = false;
     $this->lblVars = new QLabel($this);
 }
 protected function Form_Create()
 {
     // define the proxy that we will use later
     $this->pxyLink = new QControlProxy($this);
     $this->pxyLink->AddAction(new QMouseOverEvent(), new QAjaxAction('mouseOver'));
     // Define the DataGrid
     $this->tblProjects = new QHtmlTable($this);
     // This css class is used to style alternate rows and the header, all in css
     $this->tblProjects->CssClass = 'simple_table';
     // Define Columns
     // Create a link column that shows the name of the project, and when clicked, calls back to this page with an id
     // of the item clicked on
     $this->tblProjects->CreateLinkColumn('Project', '->Name', QApplication::$ScriptName, ['intId' => '->Id']);
     // Create a link column using a proxy
     $col = $this->tblProjects->CreateLinkColumn('Status', '->ProjectStatusType', $this->pxyLink, '->Id');
     $this->tblProjects->SetDataBinder('tblProjects_Bind');
     $this->pnlClick = new QPanel($this);
     if (($intId = QApplication::QueryString('intId')) && ($objProject = Project::Load($intId))) {
         $this->pnlClick->Text = 'You clicked on ' . $objProject->Name;
     }
 }
 protected function Form_Create()
 {
     // Define the DataGrid
     $this->tblPersons = new QHtmlTable($this);
     $this->tblPersons->CssClass = 'simple_table';
     $this->tblPersons->RowCssClass = 'odd_row';
     $this->tblPersons->AlternateRowCssClass = 'even_row';
     $this->tblPersons->HeaderRowCssClass = 'header_row';
     // Define Columns
     // This demonstrates how to first create a column, and then add it to the table
     $objColumn = new QHtmlTableCallableColumn('Full Name', [$this, 'getFullName']);
     $this->tblPersons->AddColumn($objColumn);
     // The second column demonstrates using a property name for fetching the data
     // This also demonstrates how to create a column and add it to the table all at once, using the CreatePropertyColumn shortcut
     $this->tblPersons->CreatePropertyColumn('First Name', 'FirstName');
     // The second column demonstrates using a node column for fetching the data
     $this->tblPersons->CreateNodeColumn('Last Name', QQN::Person()->LastName);
     // Specify the local Method which will actually bind the data source to the datagrid.
     // In order to not over-bloat the form state, the datagrid will use the data source only when rendering itself,
     // and then it will proceed to remove the data source from memory.  Because of this, you will need to define
     // a "data binding" method which will set the datagrid's data source.  You specify the name of the method
     // here.  The framework will be responsible for calling your data binding method whenever the datagrid wants
     // to render itself.
     $this->tblPersons->SetDataBinder('tblPersons_Bind');
     $this->tblReport = new QHtmlTable($this);
     $this->tblReport->CssClass = 'simple_table';
     $this->tblReport->RowCssClass = 'odd_row';
     $this->tblReport->AlternateRowCssClass = 'even_row';
     $this->tblReport->HeaderRowCssClass = 'header_row';
     // "named" index columns
     $this->tblReport->CreateIndexedColumn("Year", 0);
     $this->tblReport->CreateIndexedColumn("Model", 1);
     // "unnamed" index columns
     $this->tblReport->CreateIndexedColumn();
     $this->tblReport->CreateIndexedColumn();
     // index columns for associative arrays
     $this->tblReport->CreateIndexedColumn("Count", "#count");
     $this->tblReport->SetDataBinder('tblReport_Bind');
     $this->tblComplex = new QHtmlTable($this);
     $this->tblComplex->CssClass = 'simple_table';
     $this->tblComplex->RowCssClass = 'odd_row';
     $this->tblComplex->AlternateRowCssClass = 'even_row';
     $this->tblComplex->HeaderRowCssClass = 'header_row';
     // "named" index columns
     $col = $this->tblComplex->AddColumn(new ComplexColumn("", "Name"));
     $col->RenderAsHeader = true;
     $this->tblComplex->AddColumn(new ComplexColumn("2000", 1));
     $this->tblComplex->AddColumn(new ComplexColumn("2001", 2));
     $this->tblComplex->AddColumn(new ComplexColumn("2002", 3));
     $this->tblComplex->HeaderRowCount = 2;
     $this->tblComplex->SetDataBinder('tblComplex_Bind');
 }
 protected function Form_Create()
 {
     // Define the DataGrid
     $this->tblProjects = new QHtmlTable($this);
     // This css class is used to style alternate rows and the header, all in css
     $this->tblProjects->CssClass = 'simple_table';
     // Define Columns
     // Show the name of the project
     $this->tblProjects->CreateNodeColumn('Project', QQN::Project()->Name);
     // Date column formatting. Uses the Format string to format the date object that is in the column.
     $col = $this->tblProjects->CreateNodeColumn('Start Date', QQN::Project()->StartDate);
     $col->Format = 'MM/DD/YY';
     $col = $this->tblProjects->CreateNodeColumn('End Date', QQN::Project()->EndDate);
     $col->Format = 'DDD, MMM D, YYYY';
     // PersonAsTeamMemberArray is an array of names. Use a callback to format the array into a string.
     $col = $this->tblProjects->CreatePropertyColumn('Members', 'PersonAsTeamMemberArray');
     $col->PostCallback = 'ExampleForm::RenderTeamMemberArray';
     //
     $col = $this->tblProjects->CreateCallableColumn('Balance', [$this, 'dtgPerson_BalanceRender']);
     $col->CellParamsCallback = [$this, 'dtgPerson_BalanceAttributes'];
     $this->tblProjects->SetDataBinder('tblProjects_Bind');
 }
 /**
  * @param string $strName
  * @param string $mixValue
  * @throws QCallerException
  * @throws QInvalidCastException
  */
 public function __set($strName, $mixValue)
 {
     switch ($strName) {
         case "SortColumnId":
             try {
                 $this->strSortColumnId = QType::Cast($mixValue, QType::String);
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "SortColumnIndex":
             try {
                 $intIndex = QType::Cast($mixValue, QType::Integer);
                 if ($intIndex < 0) {
                     $intIndex = 0;
                 }
                 if ($intIndex < count($this->objColumnArray)) {
                     $objColumn = $this->objColumnArray[$intIndex];
                 } elseif (count($this->objColumnArray) > 0) {
                     $objColumn = end($this->objColumnArray);
                 } else {
                     // no columns
                     $objColumn = null;
                 }
                 if ($objColumn && $objColumn->OrderByClause) {
                     $this->strSortColumnId = $objColumn->Id;
                 }
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             break;
         case "SortDirection":
             try {
                 $this->intSortDirection = QType::Cast($mixValue, QType::Integer);
                 if ($this->intSortDirection != self::SortDescending) {
                     $this->intSortDirection = self::SortAscending;
                     // make sure its only one of two values
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case "SortInfo":
             // restore the SortInfo obtained from the getter
             try {
                 if (isset($mixValue['id']) && isset($mixValue['dir'])) {
                     $this->intSortDirection = QType::Cast($mixValue['dir'], QType::Integer);
                     $this->strSortColumnId = QType::Cast($mixValue['id'], QType::String);
                 }
                 break;
             } catch (QInvalidCastException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         default:
             try {
                 parent::__set($strName, $mixValue);
                 break;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
 /**
  * Recreate the tabs in the dialog
  */
 protected function SetupTabs()
 {
     $strClassNames = $this->CreateClassNameArray();
     $this->tabs->RemoveChildControls(true);
     $this->categories = array();
     $this->dtgGeneralOptions = new QHtmlTable($this->tabs, 'definitionTab');
     $this->dtgGeneralOptions->ShowHeader = false;
     $this->dtgGeneralOptions->Name = "General";
     $this->dtgGeneralOptions->CreatePropertyColumn('Attribute', 'Name');
     $col = $this->dtgGeneralOptions->AddColumn(new QHtmlTableCallableColumn('Attribute', array($this, 'dtg_ValueRender'), $this->dtgGeneralOptions));
     $col->HtmlEntities = false;
     $this->dtgGeneralOptions->SetDataBinder('dtgGeneralOptions_Bind', $this);
     /**
      * The following default options are somewhat matched to the default list and edit templates. A more robust
      * implementation would get the options from the templates, or what the templates generate, so that the templates
      * decide what to put there. If someone wants to radically change the templates, but still have them use this dialog
      * to edit the options, then would be the time to change the code below.
      */
     if ($this->objCurrentControl->LinkedNode->_ParentNode) {
         // Specify general options for a database column
         $this->generalOptions = array(new QModelConnectorParam(QModelConnectorParam::GeneralCategory, 'ControlClass', 'Override of the PHP type for the control. If you change this, save the dialog and reopen to reload the tabs to show the control specific options.', QModelConnectorParam::SelectionList, $strClassNames), new QModelConnectorParam(QModelConnectorParam::GeneralCategory, 'FormGen', 'Whether or not to generate this object, just a label for the object, just the control, or both the control and label', QModelConnectorParam::SelectionList, array(QFormGen::Both => 'Both', QFormGen::None => 'None', QFormGen::ControlOnly => 'Control', QFormGen::LabelOnly => 'Label')), new QModelConnectorParam(QModelConnectorParam::GeneralCategory, 'Name', 'Control\'s Name', QType::String), new QModelConnectorParam(QModelConnectorParam::GeneralCategory, 'NoColumn', 'True to prevent a column in the lister from being generated.', QType::Boolean));
     } else {
         // Specify general options for a database table, meaning an object that is listing the content of a whole table.
         // These would be options at a higher level than the control itself, and would modify how the control is used in a form.
         $this->generalOptions = array(new QModelConnectorParam(QModelConnectorParam::GeneralCategory, 'ControlClass', 'Override of the PHP type for the control. If you change this, save the dialog and reopen to reload the tabs to show the control specific options.', QModelConnectorParam::SelectionList, $strClassNames), new QModelConnectorParam(QModelConnectorParam::GeneralCategory, 'Name', 'The Control\'s Name. Generally leave this blank, or use a plural name.', QType::String), new QModelConnectorParam(QModelConnectorParam::GeneralCategory, 'ItemName', 'The public name of an item in the list. Its used by the title of the edit form, for example. Defaults to the name of the table in the database.', QType::String), new QModelConnectorParam(QModelConnectorParam::GeneralCategory, 'CreateFilter', 'Whether to generate a separate control to filter the data. If the data list control does its own filtering, set this to false. Default is true.', QType::Boolean), new QModelConnectorParam(QModelConnectorParam::GeneralCategory, 'EditMode', 'How to edit an item. 1) Options are: to go to a separate form, 2) popup a dialog, or 3) popup a dialog only if not on a mobile device since mobile devices struggle with showing dialogs that are bigger than the screen.', QModelConnectorParam::SelectionList, array('form' => 'Edit with a QForm', 'dialog' => 'Edit with a QDialog', 'both' => 'Edit with a form on mobile devices, and a dialog on desktops.')));
     }
     // load values from settings file
     foreach ($this->generalOptions as $objParam) {
         $objControl = $objParam->GetControl($this->dtgGeneralOptions);
         // get a control that will edit this option
         $strName = $objControl->Name;
         if (isset($this->params[$strName])) {
             $objControl->Value = $this->params[$strName];
             if ($strName == 'ControlClass') {
                 $strControlClass = $this->params[$strName];
             }
         } else {
             $objControl->Value = null;
         }
     }
     if (!isset($strControlClass)) {
         $strControlClass = get_class($this->objCurrentControl);
     }
     $params = $strControlClass::GetModelConnectorParams();
     // gather categories
     foreach ($params as $param) {
         $this->categories[$param->Category][] = $param;
     }
     // Add any additional general items to the general tab
     if (isset($this->categories[QModelConnectorParam::GeneralCategory])) {
         // load values from settings file
         foreach ($this->categories[QModelConnectorParam::GeneralCategory] as $objParam) {
             $objControl = $objParam->GetControl($this->dtgGeneralOptions);
             // get a control that will edit this option
             $strName = $objControl->Name;
             if (isset($this->params[$strName])) {
                 $objControl->Value = $this->params[$strName];
             } else {
                 $objControl->Value = null;
             }
             $this->generalOptions[] = $objParam;
         }
         unset($this->categories[QModelConnectorParam::GeneralCategory]);
     }
     foreach ($this->categories as $tabName => $params) {
         $panel = new QPanel($this->tabs);
         $panel->SetCustomStyle('overflow-y', 'scroll');
         $panel->SetCustomStyle('max-height', '200');
         $panel->AutoRenderChildren = true;
         $panel->Name = $tabName;
         $dtg = new QHtmlTable($panel);
         $dtg->ShowHeader = false;
         $dtg->CreatePropertyColumn('Attribute', 'Name');
         $col = $dtg->AddColumn(new QHtmlTableCallableColumn('Attribute', array($this, 'dtg_ValueRender'), $dtg));
         $col->HtmlEntities = false;
         $dtg->SetDataBinder('dtgControlBind', $this);
         $dtg->Name = $tabName;
         // holder for category
         $this->datagrids[$tabName] = $dtg;
         // load values from settings file
         foreach ($params as $objParam) {
             $objControl = $objParam->GetControl($this->datagrids[$tabName]);
             if ($objControl) {
                 $strName = $objControl->Name;
                 if (isset($this->params['Overrides'][$strName])) {
                     $objControl->Value = $this->params['Overrides'][$strName];
                 } else {
                     $objControl->Value = null;
                 }
             }
         }
     }
 }
 /**
  * If this control is attachable to a codegenerated control in a ModelConnector, this function will be
  * used by the ModelConnector designer dialog to display a list of options for the control.
  * @return QModelConnectorParam[]
  **/
 public static function GetModelConnectorParams()
 {
     return array_merge(parent::GetModelConnectorParams(), array(new QModelConnectorParam(get_called_class(), 'AutoWidth', 'Enable or disable automatic column width calculation. This can bedisabled as an optimisation (it takes a finite amount of time tocalculate the widths) if the tables widths are passed in usingcolumns.widthDT.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'DeferRender', 'By default, when DataTables loads data from an Ajax or Javascript datasource (ajaxDT and dataDT respectively) it will create all HTMLelements needed up-front. When working with large data sets, thisoperation can take a not-insignificant amount of time, particularly inolder browsers such as IE6-8. This option allows DataTables to createthe nodes (rows and cells in the table body) only when they are neededfor a draw.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'Info', 'When this option is enabled, Datatables will show information aboutthe table including information about filtered data if that action isbeing performed. This option allows that feature to be enabled ordisabled.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'JQueryUI', 'DataTables can be styled by a number of CSS library packages, includedjQuery UI, Twitter Bootstrap and Foundation. Although Bootstrap,Foundation and other libraries require a plug-in, jQuery UIThemeRoller support is built into DataTables and can be enabled simplywith this parameter. When enabled, DataTables will use markup andclasses created for jQuery UI ThemeRoller, making it very easy tointegrate your tables with jQuery UI.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'LengthChange', 'When pagination is enabled, this option will control the display anoption for the end user to change number of records to be shown perpage. The options shown in the list are controlled by the lengthMenuDTconfiguration option.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'Ordering', 'Enable or disable ordering of columns - it is as simple as that!DataTables, by default, allows end users to click on the header cellfor each column, ordering the table by the data in that column. Theability to order data can be disabled using this option.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'Paging', 'DataTables can split the rows in tables into individual pages, whichis an efficient method of showing a large number of records in a smallspace. The end user is provided with controls to request the displayof different data as the navigate through the data. This feature isenabled by default, but if you wish to disable it, you may do so withthis parameter.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'Processing', 'Enable or disable the display of a \'processing\' indicator when thetable is being processed (e.g. a sort). This is particularly usefulfor tables with large amounts of data where it can take a noticeableamount of time to sort the entries.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'ScrollX', 'Enable horizontal scrolling. When a table is too wide to fit into acertain layout, or you have a large number of columns in the table,you can enable horizontal (x) scrolling to show the table in aviewport, which can be scrolled.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'ScrollY', 'Enable vertical scrolling. Vertical scrolling will constrain theDataTable to the given height, and enable scrolling for any data whichoverflows the current viewport. This can be used as an alternative topaging to display a lot of data in a small area (although paging andscrolling can both be enabled at the same time if desired).', QType::String), new QModelConnectorParam(get_called_class(), 'Searching', 'This option allows the search abilities of DataTables to be enabled ordisabled. Searching in DataTables is \\"smart\\" in that it allows the enduser to input multiple words (space separated) and will match a rowcontaining those words, even if not in the order that was specified(this allow matching across multiple columns).', QType::Boolean), new QModelConnectorParam(get_called_class(), 'ServerSide', 'DataTables has two fundamental modes of operation:', QType::Boolean), new QModelConnectorParam(get_called_class(), 'StateSave', 'Enable or disable state saving. When enabled aDataTables will storagestate information such as pagination position, display length,filtering and sorting. When the end user reloads the page the table\'sstate will be altered to match what they had previously set up.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'Data', 'DataTables can obtain the data it is to display in the table\'s bodyfrom a number of sources, including being passed in as an array of rowdata using this initialisation parameter. As with other dynamic datasources, arrays or objects can be used for the data source for eachrow, with columns.dataDT employed to read from specific objectproperties.', QType::ArrayType), new QModelConnectorParam(get_called_class(), 'CreatedRow', 'This callback is executed when a TR element is created (and all TDchild elements have been inserted), or registered if using a DOMsource, allowing manipulation of the TR element.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'DrawCallback', 'It can be useful to take an action on every draw event of the table -for example you might want to update an external control with thenewly displayed data, or with server-side processing is enabled youmight want to assign events to the newly created elements. Thiscallback is designed for exactly that purpose and will execute onevery draw.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'FooterCallback', 'Identical to headerCallbackDT but for the table footer this functionallows you to modify the table footer on every \'draw\' event.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'FormatNumber', 'DataTables will display numbers in a few different locations whendrawing information about a table, for example in the table\'sinformation element and the pagination controls. When working withlarge numbers it is often useful to format it for readability byseparating the thousand units - for example 1 million is rendered as\\"1,000,000\\", allowing the user to see at a glance what order ofmagnitude the number shows.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'HeaderCallback', 'This function is called on every \'draw\' event (i.e. when a filter,sort or page event is initiated by the end user or the API), andallows you to dynamically modify the header row. This can be used tocalculate and display useful information about the table.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'InfoCallback', 'The information element can be used to convey information about thecurrent state of the table. Although the internationalisation optionspresented by DataTables are quite capable of dealing with mostcustomisations, there may be times where you wish to customise thestring further. This callback allows you to do exactly that.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'InitComplete', 'It can often be useful to know when your table has fully beeninitialised, data loaded and drawn, particularly when using an ajaxDTdata source. In such a case, the table will complete its initial runbefore the data has been loaded (Ajax is asynchronous after all!) sothis callback is provided to let you know when the data is fullyloaded.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'PreDrawCallback', 'The partner of the drawCallbackDT callback, this function is called atthe very start of each table draw. It can therefore be used to updateor clean the display before each draw (for example removing events),and additionally can be used to cancel the draw by returning false.Any other return (including undefined) results in the full drawoccurring.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'RowCallback', 'This callback allows you to \'post process\' each row after it have beengenerated for each table draw, but before it is rendered into thedocument. This means that the contents of the row might not havedimensions ($().width() for example) if it is not already in thedocument.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'StateLoadCallback', 'With this callback you can define where, and how, the state of a tableis loaded from. By default DataTables will load from localStorage butyou might wish to use a server-side database or cookies as yourimplementation requirements demand. For the format of the data that isstored, please refer to the stateSaveCallbackDT documentation.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'StateLoaded', 'Callback that is fired once the state has been loaded(stateLoadCallbackDT) and the saved data manipulated (if required -stateLoadParamsDT).', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'StateLoadParams', 'Callback which allows modification of the saved state prior to loadingthat state. This callback is called when the table is loading statefrom the stored data, but prior to the settings object being modifiedby the saved state.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'StateSaveCallback', 'DataTables can save the state of the table (paging, filtering etc)when the stateSaveDT option is enabled, and by default it will useHTML5\'s localStorage to save the state into. This callback methodallows you to change where the state is saved (for example you mightwish to use a server-side database or cookies).', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'StateSaveParams', 'Callback which allows modification of the parameters to be saved forthe DataTables state saving (stateSaveDT), prior to the data actuallybeing saved. This callback is called every time DataTables requeststhat the state be saved. For the format of the data that is stored,please refer to the stateSaveCallbackDT documentation.', 'QJsClosure'), new QModelConnectorParam(get_called_class(), 'Destroy', 'Initialise a new DataTable as usual, but if there is an existingDataTable which matches the selector, it will be destroyed andreplaced with the new table. This can be useful if you want to changea property of the table which cannot be altered through the API.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'DisplayStart', 'Define the starting point for data display when using DataTables withpagination (paginateDT).', QType::Integer), new QModelConnectorParam(get_called_class(), 'Dom', 'DataTables will add a number of elements around the table to bothcontrol the table and show additional information about it. Theposition of these elements on screen are controlled by a combinationof their order in the document (DOM) and the CSS applied to theelements. This parameter is used to control their ordering andadditional mark-up surrounding them in the DOM.', QType::String), new QModelConnectorParam(get_called_class(), 'LengthMenu', 'This parameter allows you to readily specify the entries in the lengthdrop down select list that DataTables shows when pagination isenabled. It can be either:', QType::ArrayType), new QModelConnectorParam(get_called_class(), 'Order', 'If ordering is enabled (orderingDT), then DataTables will perform afirst pass order during initialisation. Using this parameter you candefine which column(s) the order is performed upon, and the orderingdirection. The orderDT must be an array of arrays, each inner arraycomprised of two elements:', QType::ArrayType), new QModelConnectorParam(get_called_class(), 'OrderCellsTop', 'Allows control over whether DataTables should use the top (true)unique cell that is found for a single column, or the bottom (false -default) to attach the default order listener. This is useful whenusing complex headers.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'OrderClasses', 'DataTables highlight the columns which are used to order the contentin the table\'s body by adding a class to the cells in that column,which in turn has CSS applied to those classes to highlight thosecells.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'OrderMulti', 'When ordering is enabled (orderingDT), by default DataTables allowsusers to sort multiple columns by shift clicking upon the header cellfor each column. Although this can be quite useful for users, it canalso increase the complexity of the order, potentiality increasing theprocessing time of ordering the data. Therefore, this option isprovided to allow this shift-click multiple column ability.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'PageLength', 'Number of rows to display on a single page when using pagination.', QType::Integer), new QModelConnectorParam(get_called_class(), 'PagingType', 'The pagination option of DataTables will display a pagination controlbelow the table (by default, its position can be changed using domDTand CSS) with buttons that the end user can use to navigate the pagesof the table. Which buttons are shown in the pagination control aredefined by the option given here.', QType::String), new QModelConnectorParam(get_called_class(), 'Retrieve', 'Retrieve the DataTables object for the given selector. Note that ifthe table has already been initialised, this parameter will causeDataTables to simply return the object that has already been set up -it will not take account of any changes you might have made to theinitialisation object passed to DataTables (setting this parameter totrue is an acknowledgement that you understand this!).', QType::Boolean), new QModelConnectorParam(get_called_class(), 'ScrollCollapse', 'When vertical (y) scrolling is enabled through the use of thescrollYDT option, DataTables will force the height of the table\'sviewport to the given height at all times (useful for layout).However, this can look odd when filtering data down to a small dataset, and the footer is left \\"floating\\" further down. This parameter(when enabled) will cause DataTables to collapse the table\'s viewportdown when the result set will fit within the given Y height.', QType::Boolean), new QModelConnectorParam(get_called_class(), 'SearchCols', 'Basically the same as the searchDT option, but in this case forindividual columns, rather than the global filter, this option definedthe filtering to apply to the table during initialisation.', QType::ArrayType), new QModelConnectorParam(get_called_class(), 'SearchDelay', 'The built in DataTables global search (by default at the top right ofevery DataTable)will instantly search the table on every keypress whenin client-side processing mode and reduce the search call frequencyautomatically to 400mS when in server-side processing mode. This callfrequency (throttling) can be controlled using the searchDelayDTparameter for both client-side and server-side processing.', QType::Integer), new QModelConnectorParam(get_called_class(), 'StateDuration', 'Duration for which the saved state information is considered valid.After this period has elapsed the state will be returned to thedefault.', QType::Integer), new QModelConnectorParam(get_called_class(), 'StripeClasses', 'An array of CSS classes that should be applied to displayed rows, insequence. This array may be of any length, and DataTables will applyeach class sequentially, looping when required.', QType::ArrayType), new QModelConnectorParam(get_called_class(), 'TabIndex', 'By default DataTables allows keyboard navigation of the table(sorting, paging, and filtering) by adding a tabindex attribute to therequired elements. This allows the end user to tab through thecontrols and press the enter key to activate them, allowing the tablecontrols to be accessible without a mouse.', QType::Integer), new QModelConnectorParam(get_called_class(), 'ColumnDefs', 'Very similar to columnsDT, this parameter allows you to assignspecific options to columns in the table, although in this case thecolumn options defined can be applied to one or more columns.Additionally, not every column need be specified, unlike columnsDT.', QType::ArrayType), new QModelConnectorParam(get_called_class(), 'Columns', 'The columnsDT option in the initialisation parameter allows you todefine details about the way individual columns behave. For a fulllist of column options that can be set, please see the relatedparameters below.', QType::ArrayType)));
 }