You need to sign in to do that
Don't have an account?
Shekhar 13
Wrapper class VF page error
Hi All !
I am trying to create a wrapper class , but in the VF page Iam getting error Unknown property 'String.DCode'. Any advice on this
<apex:page controller="wrapperclass">
<apex:form>
<apex:pageBlock>
<apex:pageBlockSection>
<apex:pageBlockTable value="{!lstwrapperstring}" var="wrap">
<apex:column headerValue="Action">
<apex:inputCheckbox/>
</apex:column>
<apex:column headerValue="Deal Code"/>
{!wrap.DCode}
<apex:column headerValue="Course"/>
{!wrap.C}
<apex:column headerValue="Trainer First Name"/>
{!wrap.TFirstName}
<apex:column headerValue="Trainer Last Name"/>
{!wrap.TLastName}
<apex:column headerValue="Trainer Education"/>
{!wrap.TEducation}
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
I am trying to create a wrapper class , but in the VF page Iam getting error Unknown property 'String.DCode'. Any advice on this
<apex:page controller="wrapperclass">
<apex:form>
<apex:pageBlock>
<apex:pageBlockSection>
<apex:pageBlockTable value="{!lstwrapperstring}" var="wrap">
<apex:column headerValue="Action">
<apex:inputCheckbox/>
</apex:column>
<apex:column headerValue="Deal Code"/>
{!wrap.DCode}
<apex:column headerValue="Course"/>
{!wrap.C}
<apex:column headerValue="Trainer First Name"/>
{!wrap.TFirstName}
<apex:column headerValue="Trainer Last Name"/>
{!wrap.TLastName}
<apex:column headerValue="Trainer Education"/>
{!wrap.TEducation}
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
It seems like you don't have any value for DCode in lstwrapperstring variable which is being set from the wrapper class.
Please ensure you have similar name being passed from the controller so that it can be accessed in VF page.
Hope above information helps. Please mark as Best Answer so that it can help others in future.
Thanks.