Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5930265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:31:56+00:00 2026-05-22T14:31:56+00:00

I have a extjs tabpanel and a toolbar defined like this. tbar : {

  • 0

I have a extjs tabpanel and a toolbar defined like this.

tbar : {
{
xtype:'box',
tpl:[
'<table><tr><td>',
'<b>Total Prelim Shares:</b> ',
'</td><tpl if="totalPrelimShares < 0" ><td width="30" style = "color:red">',
'{totalPrelimShares}',
'</td></tpl><td width="10">',
'<span class="xtb-sep"></span>',
'</td><td>',
'<b>Total Prelim Gross Amount:</b>',
'</td><td width="70">',
'{totalPrelimGrossAmount}',
'</td><td>',
'<b>Total Prelim Net Amount:</b>',
'</td><td width="70">',
'{totalPrelimNetAmount}',
'</td></tr><table>'             

],
ref:'../ipTotalBar',
data:{totalPrelimShares :'0'}
}
}

I call it like this:

var obj = {totalPrelimShares :  -10,totalPrelimNetAmount:20,totalPrelimGrossAmount : 30 };
this.ipTotalBar.update(obj);

No errors, but the {totalPrelimShares} does not show up. When I remove the tpl if="totalPrelimShares < 0" >, it works fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:31:57+00:00Added an answer on May 22, 2026 at 2:31 pm

    The problem that you’re experiencing may be because the XTemplate does not know what totalPrelimShares is. In the examples in the XTemplate documentation, whenever using a variable passed into the template configuration (like totalPrelimShares, in your case), it is always referred to using this.*. For example:

    <tpl if="this.totalPrelimShares < 0">
    

    If that doesn’t work, you can also try using the inline operators {[ ... ]} as defined in the documentation:

    <tpl if="{[totalPrelimShares]} < 0">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a extjs panel rendered inside a div like this: panel = new
I have an ExtJS grid on a web page and I'd like to save
I'm using ExtJS on a registration page which should have no effect on this.
For example if I have extjs ComboBox, and I have URL like http://localhost:8080?param=value1,value2,value3 How
I have a JavaScript application which opens an ExtJS Window, containing an ExtJS TabPanel,
I have an Extjs Grid with a Paging toolbar. I need to pass the
I have an ExtJS window, with a toolbar at the top, and loads with
I have a layout that looks like the following: Ext.Viewport{ Ext.Panel{ Ext.Panel{ Ext.TabPanel{ Ext.Panel{
I have an ExtJS grid like so: var grid = new Ext.grid.GridPanel({ ... });
I'm stumped on this. We have an ExtJS form where birthdate is entered. However,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.