1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    14
    Vote Rating
    0
    raghuprassad is on a distinguished road

      0  

    Default Unanswered: How to verify the selected node is leaf node of tree

    Unanswered: How to verify the selected node is leaf node of tree


    Hi,
    How to verify the leaf node of the tree if someone selecting the leaf node? Since select event returns four parameter (this,record,index,eOpts),record is Ext.data.Model, but there is no function for verifying the leaf node. Even in Ext.tree.Panel don't have the function for verifying the leafe node.

    I want to verify that the selected node is leaf node.

    Any help will be much appreciated.


    Thanks

  2. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,114
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    Code:
    record.isLeaf()
    or

    Code:
    record.data.leaf
    check the nodeInterface http://docs.sencha.com/ext-js/4-1/#!....NodeInterface

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    14
    Vote Rating
    0
    raghuprassad is on a distinguished road

      0  

    Default


    Hi tvanzoelen,

    Thanks for quick reply.
    record.isLeaf() is working fine. But I don't understand , in this scenario record is the model instance. But in Ext.data.Model don't have any method isLeaf(). How do i find this isLeaf() method of NodeInterface should apply on
    record. I am not able to understand that. How to identify the relation between the Model and NodeInterface. In the docs there is nothing mentioned in Model that all the methods of NodeInterface can be apply on model instance.

    Please help me understand the docs provided by extjs group.

    thanks

  4. #4
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,114
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    If you configured you tree properly the model used in the tree is a TreeModel

    http://docs.sencha.com/ext-js/4-1/#!...data.TreeModel

    See that the NodeInterface is in the required section. The TreeModel is decorated with methods of the nodeInterface.

    And if not there is always the leaf property in the record.data part.

  5. #5
    Sencha User
    Join Date
    Aug 2012
    Posts
    14
    Vote Rating
    0
    raghuprassad is on a distinguished road

      0  

    Default


    Thanks tvanzoelen, to make me understand how it works. I am using Ext.data.Model but still it's working.

    I have one more issue, please help me on that,
    My issue is that , I want to restrict entering more than 1000 character in htmleditor. The character can be anything may be it's html tag , white space etc.I want to validate the htmleditor for that , if the entered character is more than 1000 than the htmleditor field should be validation fail and it will show the red color border on the field. It just similar like maxNumer : 1000 in textarea or textfield.

    Can you please help me out in this?





    Thanks

Thread Participants: 1

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