1. #11
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    604
    Answers
    66
    Vote Rating
    26
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    You might need to manually bubble events from the child model / association store, though I would expect that is happening by default.

  2. #12
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Answers
    6
    Vote Rating
    7
    Kikketer is on a distinguished road

      0  

    Default


    I'm attempting a very similar type data item. I basically wish to use a standard component that has various setters that the data controls. Following the examples early in this post I'm able to get a component to list in each data item, but I'm not sure how to set the values of the component.

    Here's what I have for the component:
    Code:
    Ext.define("Stat.view.SplashListComponent", {
      extend : "Ext.Container",
      xtype : "splaem",
    
    
      config : {
        name : "temp name",
    
    
        items : [
          {
            xtype : "component",
            id : "name",
            html : "temp"
          }
        ]
      },
    
    
      setName : function(name) {
        var thisItem = Ext.ComponentQuery.query('splaem');
        thisItem[0].down("#name").setHtml(name);
      }
    
    
    });
    It's currently giving me a warning:
    Code:
    [WARN][Ext.Component#constructor] Registering a component with a id (`name`) which has already been used. Please ensure the existing component has been destroyed (`Ext.Component#destroy()`.
    


    And I'm not sure how to actually change the value of the name component. The query in the setName is somewhat useful, but it's only able to access the first one (I guess I could do thisItem.length but that seems like a hack).

    Is there a better way to do this?


  3. #13
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    604
    Answers
    66
    Vote Rating
    26
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    It s not the name of the component, it's the id that raise that error. Ids should be unique per dom so don't use them like that. Using an id for an item renderer will make you find many elements with the same id.

  4. #14
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Answers
    6
    Vote Rating
    7
    Kikketer is on a distinguished road

      0  

    Default


    Quote Originally Posted by bluehipy View Post
    It s not the name of the component, it's the id that raise that error. Ids should be unique per dom so don't use them like that. Using an id for an item renderer will make you find many elements with the same id.
    I understand that the id can't be reused per normal html standards, but isn't that id used to set the data? Here's a bit of code from the dataitem that uses this splaem:
    Code:
     dataMap : {
          getSplaem : {
            setIcon : 'image',
            setName : 'name',
            setGeneralInfo : 'AndroidTotalDownloads'
          }
        },
    
    
        splaem : {
          xtype : "splaem"
        }
    Last edited by Kikketer; 21 May 2012 at 11:45 AM. Reason: Some strange editing done with the word "Splaem"

  5. #15
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    604
    Answers
    66
    Vote Rating
    26
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    In your example, yes the id is used to find that element, but it shouldn't. Use a different selector, like any config attribute, to reference your desired element.
    Id should be unique to keep its sense of identifier.

  6. #16
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Answers
    6
    Vote Rating
    7
    Kikketer is on a distinguished road

      0  

    Default


    Quote Originally Posted by bluehipy View Post
    In your example, yes the id is used to find that element, but it shouldn't. Use a different selector, like any config attribute, to reference your desired element.
    Id should be unique to keep its sense of identifier.
    Ok I was getting confused and thought the id:'name' was generating the setName function used later. Durr, I had that function spelt out in the example even. I should be able to figure this out now, thanks! (+1 answer if I could)

  7. #17
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    604
    Answers
    66
    Vote Rating
    26
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    tx!

  8. #18
    Sencha User
    Join Date
    Apr 2012
    Location
    Denmark
    Posts
    71
    Answers
    1
    Vote Rating
    1
    hjeDK is on a distinguished road

      0  

    Default Dynamic HTML

    Dynamic HTML


    This might come out of context, but I'm trying to make a component list of my own and I need to make every list item comprise a string (html) and 2 (hidden) buttons at the far right. I have adapted the kitten example. but I'm only able to put in 1 field from my model in the name component.

    Is it possible to use a template like in the 'regular' type list?
    something like
    HTML Code:
    itemTpl: {field1} {field2} {field3}
    or do I need a component for each field in the model?

  9. #19
    Sencha User bluehipy's Avatar
    Join Date
    Mar 2010
    Location
    Romania
    Posts
    604
    Answers
    66
    Vote Rating
    26
    bluehipy will become famous soon enough bluehipy will become famous soon enough

      0  

    Default


    @hjeDK your message is not clear.

  10. #20
    Sencha User
    Join Date
    Apr 2012
    Location
    Denmark
    Posts
    71
    Answers
    1
    Vote Rating
    1
    hjeDK is on a distinguished road

      0  

    Default


    okay, in my model I have 4-5 fields that I'd like to show in my list. With the 'non-component' list I would make a template stating all the given fields I want to show on each list item:
    PHP Code:
    '{field1} {field2} {etc...}' 
    each set of curly brackets as a placeholder for each of the field I want to show in a list item.
    How is that accomplish in the component list?
    Do I need a component for each field or is there a way to make a template like before?

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