View Full Version : call function in xTemplate

22 Jan 2010, 3:47 AM
I got dataView with xTemplate. xTemplate got function getVoiceMessageCount(parm) .
I want to call this function from xTemplate and pass the parameter from store.
I got error message missing ) after argument list. ext-all-debug.js (?????? 20640)

'<span id="button-{buttonId}-vmCount">{[this.getVoiceMessageCount({buttonId})]}</span>',

When i replace {buttonId} with any value e.g 5 or 10 everything works fine.

22 Jan 2010, 3:58 AM
Never mind
I found solution.
'<span id="button-{buttonId}-vmCount">{[this.getVoiceMessageCount(values["buttonId"])]}</span>',

16 Oct 2010, 7:13 AM
It work perfectly, thank's.

17 Jun 2011, 12:34 PM
I'm trying to do something similar but it's not working - can you paste a little more of your code (like the function) so I can see how this works?

18 Jun 2011, 5:52 PM
@heaversm, this is all documented is the API docs for XTemplate, including examples. If you need more help then please post your code.