Hello Gustavo,
the mailing list is for RAP project development-related
communication. Please use the newsgroup for questions, support and information
exchange between users and developers of RAP.
Anyway, I don't understand what you are doing, for
example I don't understand why this.getFirstChild() returns what I suppose is
your toggle button.
Ciao
Frank
Von:
rap-dev-bounces@xxxxxxxxxxx [mailto:rap-dev-bounces@xxxxxxxxxxx] Im Auftrag
von Gustavo Steigert
Gesendet: Freitag, 15. August 2008 21:15
An: RAP project development-related communication
Betreff: [rap-dev] Unable to get custom widget working
Hi,
I followed the GMap custom widget tutorial in order to create a new custom
component, but it seems the _javascript_ is not running as I interact with the
component.
This is what I have:
- AlertMessageRetriever (extends Composite): My
custom component (it has just a toggle button, which I want to listen for
events)
- AlertMessageRetrieverLCA (extends
AbstractWidgetLCA): My component's LCA
- Resource (implements IResource): Java-script
resource
- AlertMessageRetriever.js: My JS file
Follows the contents of the
"AlertMessageRetriever.js" file:
qx.Class.define("custom.AlertMessageRetriever",
{
extend :qx.ui.core.FlowLayout,
construct : function(id) {
this.base(arguments);
this.setHtmlAttribute("id",
id);
var bt = this.getFirstChild();
bt.addEventListener("execute",
this._onExecute, this);
},
properties : {
active : {
init : false
}
},
_onExecute : function() {
alert("_onExecute");
}
});
When I click on the button nothing happens (an alert containing "_onExecute" was supposed to
display).
Does anybody know the reason?
Thanks,
Gustavo Steigert