+ Start a Discussion
studiopikastudiopika 

Wrapper Class with primitive data Type

 

I'm trying to write a wrapper class that includes search results from querying two Salesforce Objects. One of the elements in my class I prefer it to be a String, and the other one an Integer, and when I reference them in V.F., it won't compile. "Could not resolve the entity from <apex:inputField> value binding {!WrapperClassList.Stringelement}, <apex:inputField> can only be used with SObject fields". I'm able to include a Boolean element and that returns just fine.

 

How do I turn a String and an Integer type into something that can be passed through between an apex wrapper class and a V.F. page? Thanks!

Rajesh SriramuluRajesh Sriramulu

Hi

 

if ur class liek this means

 

class outerclass{

 

class innerclass{

string Stringelement;

}}

 

U have do like this

 

{!outerclass.innerclass.Stringelement}

 

 

Regards,

Rajesh.