1. #1
    Sencha User
    Join Date
    Feb 2012
    Location
    Illinois
    Posts
    93
    Vote Rating
    2
    bwags is on a distinguished road

      0  

    Default Answered: Functions inside itemTpl

    Answered: Functions inside itemTpl


    I had another question answered early regarding date formatting inside an itemTpl. The solution was to set my itemTpl as:

    Code:
    itemTpl: '<p>{displayName}{dateCreated:date("M j, Y")}</p>'
    My question is what exactly does the ':' after dateCreated do? I've played with it and search quite a bit but haven't been able to find what all the options are there.

    Thanks,

    Brad

  2. The : is a shortcut for Ext.util.Format methods.

    You can use {[this.customMethod(values.someProperty)]} and add custom functions to your templates o use some "global" util functions without defining them for your templates.

  3. #2
    Ext JS Premium Member Steffen Hiller's Avatar
    Join Date
    Mar 2008
    Posts
    773
    Vote Rating
    28
    Answers
    7
    Steffen Hiller will become famous soon enough Steffen Hiller will become famous soon enough

      0  

    Default


    The : is a shortcut for Ext.util.Format methods.

    You can use {[this.customMethod(values.someProperty)]} and add custom functions to your templates o use some "global" util functions without defining them for your templates.

Thread Participants: 1

Tags for this Thread