[CLOSED] [Razor] DropDownField LazyInit property

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] [Razor] DropDownField LazyInit property

    Hi,

    In v2 Razor syntax I don't see method for setting LazyInit property in DropDownField. Is this syntax changed?
    Last edited by Daniil; May 25, 2012 at 11:04 AM. Reason: [CLOSED]
  2. #2
    There is no such functionality in v2, picker control can be retrieved at any moment via 'getPicker' client side method
    Can you describe what are you trying to achieve?
  3. #3
    I try to explain:

    I have two dropdown field-s. In both of them there is TreePanel. When user select one node from first treepanel i need to load (or reload) TreeStore for second treePanel. That means that second tree dinamicly loads.
    My idea for solution is: when user double clicks on node from first treepanel I call listener handler and reload treeStore for second treePanel with function:

    Ext.getCmp('TreePanelKontniPlanStavka').store.load();
    But this don't work because 'TreePanelKontniPlanStavka' is in dropDownField and inits first time when user drops down second dropDownField.
  4. #4
    As I said before you can use 'getPicker' method
    var tree = App.MyDropDownField2.getPicker();
    tree.store.load();
  5. #5
    Thanks, I just trying that. But now I have problem that treePanel loads two or three times. I don't know why.
  6. #6
    That happens only first time I load treestore.
  7. #7
    I guess that is your root node is not visible (RootVisible is false) therefore store is automatically loads its during creation
    Try to set AutoLoad="false" for the store or make root is visible
  8. #8
    This combination don't call controller twice:
    Expanded(false) for root.
    RootVisible(true) for TreePanel


    AutoLoad does not have influence.

    But I realy don't need to show root.
  9. #9
    Quote Originally Posted by boris View Post
    AutoLoad does not have influence.
    It has been recently fixed. Please update from SVN or set up
    <CustomConfig>
        <ext:ConfigItem Name="autoLoad" Value="false" Mode="Raw" />
    </CustomConfig>
  10. #10
    Yes, it is fixed in SVN but there is one issue
    If root is not visible and not loaded yet then need to use expand method instead store loading otherwise children will not be rendered
    Therefore i suggest do not use AutoLoad="false" and use the following construction
    var tree = App.MyDropDownField2.getPicker();
    tree.store.getRootNode().isLoaded() && tree.store.load();
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] [RAZOR] DraggablePanelConfig doesn't have StartDrag in Razor
    By UnifyEducation in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 28, 2012, 2:37 PM
  2. [CLOSED] [Razor] HyperLink Text in Razor
    By UnifyEducation in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Jun 20, 2012, 12:16 PM
  3. [CLOSED] [Razor] Add GridView to GridPanel in razor
    By boris in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: May 09, 2012, 4:23 PM
  4. [CLOSED] [Razor] Setup Auto load panel in razor
    By UnifyEducation in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 27, 2012, 10:54 AM
  5. Replies: 6
    Last Post: Apr 09, 2012, 3:33 PM

Tags for this Thread

Posting Permissions