Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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

Back to the top