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,640
    Answers
    107
    Vote Rating
    80
    Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice Colin Alworth is just really nice

      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

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar