lsmith/yui3 — Issue #5: Add status message API
Author: lsmith
Created: 2011-12-13 08:02:21+00:00
State: open

Likely a class extension that auto-mix()es onto Y.DataTable.

Adds `showMessage([html])` and `hideMessage()` methods to the proto and a `statusMessage` attribute that defaults to "No records". Possibly, include a `noRecordsMessage` or some such (warning: naming discussion) as a separate attribute for that specific case.

`showMessage()` will display the configured message. `showMessage(html)` will show the provided message. I don't think it should update the attribute.

The challenging part here is when and how to wire it in to DT operation. It should initialize with an `after('render')` to display the message if the `data` is empty, and perhaps `on(['dataChange', '*:change', '*:reset', etc])` to hide the message. Then a sync layer implementation could attach the loading message if a feature test showed the extension was there.