May 15, 2012, 5:22 PM
Combobox template always shows fields, even when theres no data
I currently have a combobox that I create an html template for, then through the HttpProxy and JsonReader supply it data from a web service. I am looking for a way to hide a template field if there is no data returned. If I remove the field from the json data coming back from the webservice, the template still displays that field's label. Can someone point to me a resource when there is more information on using the .Template.Html property of the ext.net.combobox in a dynamic fashion? Any help is appreciated, thanks!
Here is a sample of my template in HTML
I also tried adding code blocks to my html that would be evaluated at render time. (<%= %>) but it looks like something behind the scenes turns these into comment blocks. Any info on why this happens would be appreciated as well. Thanks.
Here is a sample of my template in HTML
<tpl for=".">
<div class="search-item">
<span style='margin-left:3px;'>Email: {mail}</span><br/>
<span style='margin-left:3px;'>Phone: {telephoneNumber}</span><br/>
<span style='margin-left:3px;'>Description: {description}</span><br/>
<span style='margin-left:3px;'>Department: {department}</span><br/>
<span style='margin-left:3px;'>Company: {company}</span><br/>
<br/>
</div>
</tpl>
I also tried adding code blocks to my html that would be evaluated at render time. (<%= %>) but it looks like something behind the scenes turns these into comment blocks. Any info on why this happens would be appreciated as well. Thanks.
Last edited by strader81; May 15, 2012 at 9:28 PM.
Reason: Provide more info