PDA

View Full Version : Substitution expansion



stanlick
26 Oct 2010, 8:36 AM
I downloaded touch today and have the geocongress example app running on my host. When I access the url from FF, I see the eight text areas displayed, however, the source seems to be raw. For example, I suspect the variables in the braces{} should be getting resolved but they are not. Any clues?


<textarea id="legislatorbrief" class="x-hidden-display">
<div class="legislator-brief">
<div class="legislator-tnail" style="background-image: url(http://www.govtrack.us/data/photos/{govtrack_id}-50px.jpeg)"></div>
<h3>{title} {firstname} {middlename} {lastname} ({party})</h3>
<p>{state} {district:this.ordinal}</p>
</div>
</textarea>Peace,
Scott

Steffen Hiller
26 Oct 2010, 10:28 AM
Sencha Touch works only with webkit browsers like chrome and safari, not firefox.

stanlick
26 Oct 2010, 10:34 AM
I get the same results using Chrome. So, what is supposed to replace these substitution variables?

evant
26 Oct 2010, 3:59 PM
It uses an XTemplate http://dev.sencha.com/deploy/touch/docs/?class=Ext.XTemplate

Expand the constructor docs.

stanlick
26 Oct 2010, 6:28 PM
Thanks brother

So where does this sample code run?

evant
26 Oct 2010, 6:56 PM
I'm not really sure what you're asking, which sample code?

stanlick
27 Oct 2010, 2:58 PM
geocongress example app