1. #1
    Sencha User
    Join Date
    Nov 2008
    Posts
    9
    Vote Rating
    0
    nl65 is on a distinguished road

      0  

    Default boxLabel listener

    boxLabel listener


    Trying to implement http://dev.sencha.com/deploy/ext-4.0...istration.html.
    using action controller.

    How can I setup an action to capture the click on the boxLabel ?

  2. #2
    Sencha User
    Join Date
    Jun 2011
    Posts
    350
    Vote Rating
    0
    bharatn is on a distinguished road

      0  

    Default


    Clicking on the boxlabel is equivalent to changing it. Target the checkboxfield with change event.

    Code:
    this.control({
                "checkboxfield": {
                    change: this.onCheckboxfieldChange
                }
            });
    Not sure if that is what you are looking for.
    Bharat Nagwani
    Sencha Designer Development Team

  3. #3
    Sencha User
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    989
    Vote Rating
    47
    ssamayoa has a spectacular aura about ssamayoa has a spectacular aura about

      0  

    Default


    I been using SA for half a year now and when I encounter scenarios not supported by the tool I look for an alternative way of implementing the desired functionallity.

    In your case, may be not to elegant but you could add a button for "Terms of use", create a custom component which behaves like hiperlink or create a new component based on checkbox and iimplement the desired behaviour in override class.

    Regards.
    UI: Sencha Architect 2.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  4. #4
    Sencha User
    Join Date
    Nov 2008
    Posts
    9
    Vote Rating
    0
    nl65 is on a distinguished road

      0  

    Default


    Noop..... This is a listener to the checkbox field, what is is requested is a listener on the boxLabel part of the field, to capture the click.

  5. #5
    Sencha User
    Join Date
    Nov 2008
    Posts
    9
    Vote Rating
    0
    nl65 is on a distinguished road

      0  

    Default


    Sure one can find alternative ways...however i'm trying to master the tool....

  6. #6
    Sencha User
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    989
    Vote Rating
    47
    ssamayoa has a spectacular aura about ssamayoa has a spectacular aura about

      0  

    Default


    IT IS VERY SIMPLE!

    1. Drop your checkbox in a container then set the boxLabel as the one of the example.
    2. Drop "Basic event binding" (from "Behaviors") in the checkbox.
    3. Set properties like this:

    ext1.png

    4. Copy example event code into SA event's code:

    ext2.png

    And THATS IT!

    Regards.
    UI: Sencha Architect 2.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  7. #7
    Sencha User
    Join Date
    Nov 2008
    Posts
    9
    Vote Rating
    0
    nl65 is on a distinguished road

      0  

    Default


    Cool! This is working !!!

    The event binding workflow is misleading..... I would expect it to discover all the elements contained in the control, let you select the one you need, then discover all supported events by that element and let you select the event you want....currently it assumes you bind the checkbox and will not present you a click event to select from the event binding combo box....not really user friendly...

    Thanks Much!!