1. #1
    Sencha User
    Join Date
    Sep 2007
    Posts
    59
    Vote Rating
    0
    jamone is on a distinguished road

      0  

    Default Unanswered: Ui handling TextButtons addClickHandlers

    Unanswered: Ui handling TextButtons addClickHandlers


    Can someone explain how to handle buttons in forms that are created through UiBinding?

    For example, I have created the UIBinding Form demo, but the buttons do nothing, so from that perspective the demo is useless.

    In other examples, I see the TextButton being handled by:
    @UiHandler("buttonName")
    void onClick(ClickEvent e) {
    Window.alert("Hi");
    }

    But when I try to use the above as a guide to make a button do something really useful I keep getting this error:
    Field 'buttonName' does not have an 'addClickHandler' method associated.

    Try as I might I am unable to create an addClickHandler that the TextButton will recognize, so can someone please explain how to do this?

    Thanks in Advance.

    Cheers.

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Answers
    109
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Try this instead:

    Code:
    @UiHandler("buttonName")
    void onClick(SelectEvent e) {
      Window.alert("Hi");
    }
    GXT uses the SelectEvent instead of a ClickEvent to make sure that all possible ways the user might activate the button will work correctly, including tabbing into the button and using the space or enter key. A ClickEvent wouldn't be appropriate there, as there would be no way to report a X,Y position for the click, so instead we abstract out possible selection behavior into the SelectEvent.

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi