Yui datasource update




















For object literal callbacks, the third param determines whether to execute the success handler or failure handler. The response coming back is then forwarded to the handleResponse function. This method should be customized to achieve more complex implementations.

Returns: Number Transaction ID. Returns: Object Parsed response object with the following properties: - results Array Array of parsed data results - error Boolean True if there was an error - totalRecords Number Total number of records if available. Returns: Object Parsed response object with the following properties - results Array Array of parsed data results - error Boolean True if there was an error - totalRecords Number Total number of records if available.

Returns: Number Transaction ID, or null if response found in cache. Returns: Number Interval ID. Returns: String Unique name of the DataSource instance. Parameters: oArgs. Modules animation autocomplete button calendar charts colorpicker connection container cookie datasource datatable dom dragdrop editor element event get history imagecropper imageloader json layout logger menu profiler profilerviewer resize selector slider tabview treeview uploader yahoo yuiloader yuitest.

Files DataSource. Mouna Cheikhna Mouna Cheikhna Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. It will receive the Event Facade of the keydown event as its only argument. If the argument is a string it will try to resolve it to a method within that DataTable instance by that name and execute it, ie.

If the entry is a string and cannot be resolved into a method, it will assume it is the name of an event to fire. The event listener will be provided with references to the focused cell a Node instance , the row the tr Node and column where it is contained.

If the cell is a data cell it will also contain a reference to the record while for header rows it will be null. The listener will also receive the original EventFacade of the keydown event as its second argument. The keyIntoHeaders attribute determines whether navigating into the header cells is possible. If set, the default, the first header cell will initially receive the focus and navigation in between the header and data sections of the table is possible.

If false, the first data cell will be initially focused and navigation into the header section is not possible. The focusedCell attribute holds a reference to the cell that has the focus or that would have the focus if the DataTable gets tabbed into. Setting focusedCell will bring the focus into that cell. DataTable is a composition of supporting class instances and extensions, so to centralize event reporting, it is a bubble target for its data ModelList as well as the View instances used for rendering.

In other words, some events you may need to subscribe to using an event prefix to be notified. Often, using a wildcard prefix is the simplest method to ensure your subscribers will be notified, even if classes change.

DataTable generates a custom Model class with the "record" event prefix, if you want to be more specific. Otherwise, if your table uses a custom Model class for its recordType , you can prefix Model events with the appropriate prefix.

The properties below are supported in the column configuration objects passed in the columns attribute array. Binds the column values to the named property in the data. Optional if formatter , nodeFormatter , or cellTemplate is used to populate the content. Use this to assign a name to pass to table. Use this with caution , since it can result in duplicate ids in the DOM. Used to create stacked headers. See the example above. Child columns may also contain children.

There is no limit to the depth of nesting. Columns configured with children are for display only and should not be configured with a key. Configurations relating to the display of data, such as formatter , nodeFormatter , emptyCellValue , etc. HeaderView to render the header cell for this column. This is necessary when more control is needed over the markup for the header itself, rather than its content.

BodyView to render the data cells for this column. Used to customize the content of the data cells for this column. Provides the default value to populate the cell if the data for that cell is undefined , null , or an empty string. Skips the security step of HTML escaping the value for cells in this column. If using a nodeFormatter , it is recommended to use Y. Note, the assigned width will not truncate cell content, and it will not preserve the configured width if doing so would compromise either the instance's width configuration or the natural width of the table's containing DOM elements.

If absolute widths are required, it can be accomplished with some custom CSS and the use of a cellTemplate , or formatter. See the description of datatable-column-widths for an example of how to do this. Used when the instance's sortable attribute is set to "auto" the default to determine which columns will support user sorting by clicking on the header.

If the instance's key attribute is not set, this configuration is ignored. When the instance's caseSensitive attribute is set to "true" the sort order is case sensitive relevant to string columns only. Case sensitive sort is marginally more efficient and should be considered for large data sets when case insensitive sort is not required. Allows a column to be sorted using a custom algorithm. The function receives three parameters, the first two being the two record Models to compare, and the third being a boolean true if the sort order should be descending.

The function should return -1 to sort a above b , -1 to sort a below b , and 0 if they are equal. Keep in mind that the order should be reversed when desc is true.

The desc parameter is provided to allow sortFn s to always sort certain values above or below others, such as always sorting null s on top. This configuration is public for inspection, but can't be used during DataTable instantiation to set the sort direction of the column. Use the table's sortBy attribute for that. It is also used to create the column's classname, as the input name table.

If that value has already been used such as when multiple columns have the same key , an incrementer is added to the end. HeaderView when building stacked column headers. References the parent column object. Used by Y. The properties below are found on the object passed to formatter functions defined in a column configuration. See Appendix C for the object properties passed to nodeFormatter s. The raw value from the record Model to populate this cell.

Equivalent to o. The index of the current Model in the ModelList. Typically correlates to the row index as well. This is useful to avoid the need for nodeFormatter s to add classes to the containing row. The properties below are found on the object passed to nodeFormatter functions defined in a column configuration. See Appendix B for the object properties passed to formatter s.

Otherwise, it is equivalent to o. By default, liner elements aren't rendered into cells, but to implement absolute column widths, some cell liner element with width and overflow style is required barring a table style of table-layout: fixed. Generally, the liner, if present, corresponds to where the content should go, so use o. DataTable Jump to Table of Contents. Upgrading from version 3. It should not be set if children is set.

See the example above datatable-base nodeFormatter Used to customize the content of the data cells for this column. Getting Started Upgrading from version 3.

Formatters vs. Related Examples. Creating a Modal Form. Creates the Y. Base classes, and defaults the headerView and bodyView to Y. HeaderView and Y. BodyView respectively. HeaderView class as a subclass of Y. BodyView class as a subclass of Y. Message class extension and adds showMessage and hideMessage methods to Y. ColumnWidths class extension, and adds support for the width property in column configuration objects to Y.

Mutable class extension and adds methods such as addRow , removeRow , and moveColumn to Y. Sortable class extension and adds methods sort and toggleSort as well as attributes sortable and sortBy to Y. Enables sorting the table rows by clicking on column headers. DataTableDataSource plugin for binding a DataSource instance to the table as its source of record data. Scroll class extension and adds attribute scrollable to Y. Populates Y.

Formatters with a collection of cell formatting functions. Adds paginator functionality to the DataTable. Array of values used to populate the values in the Paginator UI allowing the end user to select the number of items to display per page. String of footer or header , a Y. Node, or an Array or any combination of those values. A pointer to a Model object to be instantiated, or a String off of the Y namespace. This is only used if the pagiantorModel is a configuration object or is null.



0コメント

  • 1000 / 1000