| Page 1 of 1 | [ 9 posts ] |
|
I would like to learn more about the events occurring in my datatable. How can I configure it to display all the events either in the browser console or in a YUI console?
My YUI instance is configured with Code: { filter: 'raw', debug: true, combine: false } So, I figured I shoud see the events in the browser log, still no events, so I guess I must be missing something. Thanks. |
Juan Ignacio DopazoYUI Contributor
|
Try { filter: 'debug' }
|
|
Yep, it works. And the next natural question has to do with filtering. Can I filter the events by origin and or event type?
|
Juan Ignacio DopazoYUI Contributor
|
You should read http://yuilibrary.com/yui/docs/api/classes/config.html. There are several log options than you can use.
|
|
I guess you mean logInclude and logExclude.
Thanks. |
|
Still no dice. I am trying to understand why my widget:render event handler is never called.
So, I have: Code: YUI({ filter: 'debug', debug: true, combine: false, logInclude: {widget: true}, gallery: 'gallery-2012.05.23-19-56' }).use( Code: advancedSearchPanel = new Y.Panel({ and Code: advancedSearchPanel.on('widget:render', function () { The panel is shown with Code: advancedSearchPanel.show() The 'widget:render' handler is not called and I do not see the event log messages either. So, what is wrong? (BTW, do event sources coincide with the respective module names? if not, how do you know the log sources?) |
Juan Ignacio DopazoYUI Contributor
|
That's a documentation bug. The correct name of the event is "render".
I filed a ticketThat's a documentation bug. I filed a ticket (http://yuilibrary.com/projects/yui3/ticket/2532779) and will try to fix it later. |
|
All I want is subscribe to the show event of the panel. I am trying
advancedSearchPanel.subscribe('show', function () { It does not work. I am trying advancedSearchPanel.on('widget:render', function () { It does not work. Can someone explain how the **** thing works? |
Juan Ignacio DopazoYUI Contributor
|
There are two things that determine if a Widget (any Widget, Panel included) is visible:
- The widget is rendered (widget.render() was called), that is inserted into the page - The widget is visible (the "visible" attribute is set to true) You can subscribe for the rendering of the widget via the "render" event: widget.on('render', function () {}) And you can listen to the change of the "visible" attribute via the "visibleChange" event: widget.on('visibleChange', function (e) { if (e.newVal) { // widget is now visible } }); If you widget starts with "visible" set to true, you don't need to listen to the "visibleChange" event if you just want to know when the widget is first shown. I recommend that you read the Widget component User Guide |
| Page 1 of 1 | [ 9 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group