You need to sign in to do that
Don't have an account?
Datatable not find custom object field
Hy everyone!
I have an apex class (generated from WSDL) with the following code:
public class dfWS {
public class user_x {
public String firstName;
public String id;
public String lastName;
public String loginName;
}
}
I use this class in a cotroller class:
List<dfWS.User_x> users = new List<dfWS.User_x>();
users = ... // fill the List with data
And I want to display this list with dataTable:
<apex:dataTable id="userTable" value="{!users}" var="u">
</apex:dataTable>
But I get the following error:
Error: Unknown property 'dfWS.user_x.Id'
offhand you need a getter and the list needs to be accessible. Try changing:
List<dfWS.User_x> users = new List<dfWS.User_x>();
to:
public List<dfWS.User_x> users {get; set;}
users = new List<dfWS.User_c();
Best, Steve.
I did't write it, but I use get/set methods of course:
Sorry... just starting with the obvious...
Try public and getters on the individual properties of the User_x class as well. Otherwise, I don't see anything all that goofy.
Best, Steve.