[CLOSED] TreePanel DirectEvent CheckChange

  1. #1

    [CLOSED] TreePanel DirectEvent CheckChange

    the checkchange event on a treepanel should have two parameters Node this, bool checked

    <DirectEvents>
                            <CheckChange 
                                Url="~/UserService.asmx/SetActive" 
                                Type="Load"
                                Method="Post"                            
                                CleanRequest="true">
                                <ExtraParams>
                                    <ext:Parameter Name="userid" Value="#{user_ID}.getValue()" Mode="Raw" />
                                    <ext:Parameter Name="node" Value="this.id" Mode="Raw" />
                                    <ext:Parameter Name="bchecked" Value="checked" Mode="Raw" />
                                </ExtraParams>
                            </CheckChange>
                        </DirectEvents>
    When I evaluate the above the checked raw value is always correct but the this.id always returns the panel id and not the node id.

    Any suggestions? This is not how I expected this to return based on ExtJS model.

  2. #2

    RE: TreePanel DirectEvent CheckChange

    i just figured it out.

    You called it "node" and not "this". so it is "node.id". "this" is reserved for the container?

    Is there some good documentation for these difference yet in ext.net?

  3. #3

    RE: TreePanel DirectEvent CheckChange

    Hi,

    'this' in the Listener/DirectEvent is always references to the current control (control for which you added listener)
    Please see ExtJS documentation to figure out what arguments are allowed for the event
    For example, CheckChange


    checkchange : ( <code style="font-style: normal; font-weight: normal; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 12px; ">Node node</code>, <code style="font-style: normal; font-weight: normal; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 12px; ">Boolean checked</code> )<div class="mdesc" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; color: rgb(68, 68, 68); "><div class="long" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; display: block; line-height: 18px; ">Fires when a node with a checkbox's checked property changes<div class="mdetail-params" style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 12px; font-size: 12px; "><strong style="font-style: normal; font-weight: normal; display: block; margin-bottom: 3px; font-size: 11px; color: rgb(85, 85, 85); ">Listeners will be called with the following arguments:[/b]<ul style="margin-top: 12px; margin-right: 12px; margin-bottom: 12px; margin-left: 12px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: circle; list-style-position: inside; list-style-image: initial; "><li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-position: inside; list-style-type: circle; list-style-image: initial; ">node: Node<div class="sub-desc" style="margin-top: 5px; margin-right: 5px; margin-bottom: 5px; margin-left: 16px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">This node
    <li style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-position: inside; list-style-type: circle; list-style-image: initial; "><code style="font-style: normal; font-weight: normal; font-family: 'Lucida Console', 'Courier New', Courier, monospace; font-size: 12px; ">checked</code> : Boolean[/list]



  4. #4

    RE: TreePanel DirectEvent CheckChange

    Vlad,

    completely agree that the ExtJS manuals are necessary but we are looking at two different things in this case.

    http://www.extjs.com/deploy/dev/docs...tree.TreePanel

    checkchange
    :
    ( <code>Node this</code>, <code>Boolean checked</code> )

    <div class="short">Fires when a node with a
    checkbox's checked property changes
    Fires when a
    node with a checkbox's checked property changes<strong style="font-weight: normal;">Listeners
    will be called with the following arguments:[/b]<ul>[*]<code>this</code>
    : Node<div class="sub-desc">This node[*]<code>checked</code>
    : Boolean[/list]The ExtJS 3.2.1 docs on their site read that 'this' is the node. That is what I was trying to point out. So i kept trying to figure out why I couldn't get the right value from 'this'. And just happened to try 'node' but had no documentation to support trying that.

    So this is where I am wondering am I looking at different documentation?

    Thanks again,



  5. #5

    RE: TreePanel DirectEvent CheckChange

    Hi,

    hmm... yes, online docs defines 'this' as node
    But I think it is ExtJS documentation error ('this' for the CheckChange is tree)

Similar Threads

  1. Replies: 5
    Last Post: Mar 19, 2014, 3:35 AM
  2. Replies: 1
    Last Post: Jun 09, 2011, 7:04 PM
  3. [CLOSED] Adding a button directevent in a directevent method
    By ogokgol in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 31, 2011, 10:29 AM
  4. [CLOSED] Send all treepanel nodes to directevent as extraparam
    By KorsG in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Feb 09, 2011, 4:57 PM
  5. [CLOSED] [1.0] TreePanel add node at DirectEvent
    By methode in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 08, 2009, 1:56 PM

Posting Permissions