• Allan Cabrera
  • NEWBIE
  • 0 Points
  • Member since 2014
  • MBA

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi ,

I am learning how to use visualforce. And I copy an example of visualforce developer guide.  And when I save to salesforce server from ecilpse, I meet this error message"Attribute taborderhint is not supported for <apex:inputField> when this component is a direct or indirect child of <apex:dataTable>". codes as below:

<apex:page controller="OppsController">
<apex:form>
<apex:dataTable value="{!OpportunitiesWithIndex}" var="oppWrapped">
<apex:column>
<apex:facet name="header">Opportunity</apex:facet>
<apex:outputField value="{!oppWrapped.opp.name}"/>
</apex:column>
<apex:column>
<apex:facet name="header">Amount</apex:facet>
<apex:inputField value="{!oppWrapped.opp.amount}"
taborderhint="{!oppWrapped.tabIndex}"/>
</apex:column>
</apex:dataTable>
</apex:form>
</apex:page>

 

 

apex:

public class OppsController {
// Get a set of Opportunities
public ApexPages.StandardSetController setCon {
get {
if(setCon == null) {
setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
[SELECT name, type, amount, closedate FROM Opportunity]));
setCon.setPageSize(5);
}
return setCon;
}
set;
}
public List<Opportunity> getOpportunities() {
return (List<Opportunity>) setCon.getRecords();
}
public List<OppWrapper> getOpportunitiesWithIndex() {
List<Opportunity> opps = this.getOpportunities();
List<OppWrapper> oppsWrapped = new List<OppWrapper>();
Integer idex = 1;
for (Opportunity opp : opps) {
oppsWrapped.add(new OppWrapper(opp, idex));
idex++;
}
return oppsWrapped;
}