This is a migrated thread and some comments may be shown as answers.

Good code red

1 Answer 44 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 12 Jun 2012, 10:20 AM
I'm using client templates in RadListView and have code that looks like this...
<ItemTemplate>
    <div class="item item_#=owner.Skin# #=isSelected ? String.format('selected selected_{0}', owner.Skin) : '' #" onclick="itemSelected('#=index#', '#=dataIndex#')">
        <div><strong>#= String.format("{0}, {1}", Surname, Forename) #</strong></div>
        <div>#= OrganisationName #</div>
        <div>#= BusinessEmail #</div>
        <div>#= String.format("{0} ext {1}", BusinessPhone, BusinessPhoneExt) #</div>
        <div style="display:none;">
            <input type="checkbox" id="canAddContact" value="canAddContact" #= getPermissions("Add", OwnerGroupId) # />
            <input type="checkbox" id="canAddAdHocContact" value="canAddAdHocContact" #= getPermissions("AddAdHoc", OwnerGroupId) # />
            <input type="checkbox" id="canEditContact" value="canEditContact" #= getPermissions("Edit", OwnerGroupId) # />
            <input type="checkbox" id="canEditAdHocContact" value="canEditAdHocContact" #= getPermissions("EditAdHoc", OwnerGroupId) # />
        </div>
    </div>
</ItemTemplate>
This code does exatly what it's supposed to do, however JustCode's analysis tool doesn't like it (see SS1.png)

I think I can understand why it's having a sulk, but I imagine that it's going to encounter more and more code like this as client templates become more widely used.

--
Stuart

1 Answer, 1 is accepted

Sort by
0
Svetlozar
Telerik team
answered on 19 Jun 2012, 08:14 PM
Hi,

Thank you for your feedback. We still don't support the template binding syntax. I logged it in our system.

Kind regards,
Svetlozar
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Code Analysis
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Svetlozar
Telerik team
Share this question
or