qx.Proto = qx.OO.classes["qx.ui.table.Table"].prototype;
qx.Proto.additionalStatusMessage = '';
qx.Proto._updateStatusBar = function()
{
if (this.getStatusBarVisible())
{
var selectedRowCount = this.getSelectionModel().getSelectedCount();
var rowCount = this.getTableModel().getRowCount();
var text;
if (selectedRowCount == 0)
{
text = rowCount + ((rowCount == 1) ? " row" : " rows");
}
else
{
text = selectedRowCount + " of " + rowCount
+ ((rowCount == 1) ? " row" : " rows") + " selected";
}
text = text + " <b>" + this.additionalStatusMessage + "</b>";
this._statusBar.setHtml(text);
}
}
Jim
On 10/13/06, Til Schneider <
[EMAIL PROTECTED]> wrote:
> Yes I could have five different subclasses for my five different tables,
> but with the described method I'm able to just add an eventhandler which
> generates the messages needed. I want to "personalize" the messages not
> just displaying anonymous "rows" but things like "users" and
> "locations" etc.
OK. I understand. But I don't like the event mechanism, you described,
very much. I think a renderer concept like used for the cells and header
cells would be nicer. So perhaps you could add a statusBarRenderer
property to the table and a StatusBarRenderer class which has a
createStatusBar and a updateStatusBar method.
> And doesn't a leading underscore mean that the method _updateStatusBar
> is private and should not be overridden?
No. The underscore means protected. Protected methods may be called or
overridden by sub classes. But they shouldn't be called from "outside".
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
