You need to sign in to do that
Don't have an account?
Connor Cain
display custom class in visualforce
I am trying to create a Custom class to better display a list of multiple objects but when i search for my variables of the Class, the Visualforce throws a code like: "Unknown property 'AccountTestExtension.AccountDataModel.Size' " as well as the Title variable.
Visual Force
Visual Force
<apex:repeat value="{!AccountGroups}" var="AG"> <tr> <th colspan="{!AG.Size}" scope="row">{!AG.Title}</th> <th colspan="2" scope="row">{!AG.Notes}</th> </tr> <apex:repeat value="{!AG.Accounts}" var="acc"> <tr> <td><apex:outputField value="{!acc.Name}" style=" height: 40px"/></td> <td><apex:inputField value="{!Acc.Notes__c}" style=" height: 40px"/></td> <td><apex:inputField value="{!QAC.Description}" style=" height: 40px"/></td> </tr> </apex:repeat> </apex:repeat>Apex:
public List<AccountDataModel> AccountGroup; //main code to sort Accounts into different groups and create the different inputs of AccountGroup // // public with Sharing Class AccountDataModel{ public String Title; public Integer Size; public String Notes; Public List<Account> Accounts; public QADataModel(String title, Integer sze, String note,List<Accounts> Acc){ this.Title = title; this.Size = sze; this.Notes = note; this.Accounts = acc; } }
public String Title {get;set}
public Integer Size {get;set}
public String Notes {get;set}
and etc.
All Answers
public String Title {get;set}
public Integer Size {get;set}
public String Notes {get;set}
and etc.
public List<AccountDataModel> AccountGroup {get;set;}