Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: AW: [rap-dev] Unable to get custom widget working

The reason I'm doing this is because I'd like to poll the server in order to retrieve alert messages.
I was going to use the timer of the qooxdoo library.

Sorry, I'll use the newsgroup from now on.

Thanks,
Gustavo

Frank Appel escreveu:

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 java script 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

------------------------------------------------------------------------

_______________________________________________
rap-dev mailing list
rap-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/rap-dev


Back to the top