6

I have the following html that I"m trying to input into visualforce. The challenge is that I have attributes within the tags and I get the below error. I'm having trouble getting this in the correct format for apex, while also maintaining the functionality of my code?

Error: Attribute name "ts-default" associated with an element type "th" must be followed by the ' = ' character.

HTML:

<table class="table" ts-wrapper>
  <thead>
    <tr>
      <th ts-criteria="Id">Id</th>
      <th ts-criteria="Name|lowercase" ts-default>Name</th>
      <th ts-criteria="Price|parseFloat">Price</th>
      <th ts-criteria="Quantity|parseInt">Quantity</th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="item in items track by item.Id" ts-repeat>
      <td>{{item.Name}}</td>
      <td>{{item.Price | currency}}</td>
      <td>{{item.Quantity}}</td>
    </tr>
  </tbody>
</table>
  • Did you try ts-default="" and ts-wrapper="" – Shekhar Dec 18 '14 at 3:05
  • I assume you are inputting your HTML content inside <apex:outputText value="{!yourhtmlcontent}" escape="false" />. Please confirm. – a-learner Dec 18 '14 at 5:23
1

I guess its Boolean HTML attribute which is not supported by Visualforce, so you need to use ts-wrapper="true", So your table definition becomes <table class="table" ts-wrapper="true">

|improve this answer|||||
0

Here is a explanation on how to use custom HTML attributes in Visualforce. http://www.salesforce.com/docs/developer/pages/Content/pages_html_features_pass_through_attributes.htm

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.