Derrell Lipman a écrit : > On Wed, May 20, 2009 at 4:29 AM, Larouanne Tristan <z...@idm.fr > <mailto:z...@idm.fr>> wrote: > > In the same table I need to have a columnVisibilityMenuCreateEnd > listener and a custom map (for setting the tableColumnModel). > > columnVisibilityMenuCreateEnd seems to be fired when the tableModel is > setted (constructor or setTableModel ) but I can't set the > tableColumnModel after that. > > So the problems: > - if I want my trigger to columnVisibilityMenuCreateEnd, I need to > create a empty table object, then add the listener, then add the > tableModel (but I can't set the ColumnModel) > - if I construct my table with the custom map and the tableModel, > "then" > add my listener, the listener is never called. > > > The column visibility menu is created at the time that you click on > the column visibility button. It has nothing to do with a table model > being set. As soon as you click the column visibility button, an empty > menu is created and the "columnVisibilityMenuCreateStart" event is > dispatched. The menu is then built by looking at which columns are > visible at the time and which are not and adding each to the menu, and > finally the "columnVisiblityMenuCreateEnd" event is dispatched so that > you can modify the menu if you'd like. The table column model is > otherwise unrelated to the column visibility menu. > > Derrell I've just put an alert in the event handler function. The alert is shown when the page are loaded, not when I click on the Column Visibility Menu.
var tableModel= new qx.ui.table.model.Simple(); tableModel.setColumns([ "ID", "A number", "A date", "Boolean" ]); tableModel.setData(rowData); var table = this._table = new qx.ui.table.Table(); // We want to manipulate the button visibility menu table.addListener("columnVisibilityMenuCreateEnd", this._columnVisibilityMenuCreateEnd, this); table.setTableModel(tableModel); [...] _columnVisibilityMenuCreateEnd : function(event) { alert("ok"); }, If I put the tableModel in the constructor of the table (and remove the setTableModel), the alert is never shown. Perhaps is a version problem, I use the 0.8.2 ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ qooxdoo-devel mailing list qooxdoo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel