Does any one have any idea why I am getting this error when I try to save {!sobj.c}
Error: Read access denied for null
my code
<apex:pageBlockTable value="{!sobjlst}" var="sobj">
<apex:column >
<apex:repeat value="{!wcls}" var="sobjfd">
alert({!sobjfd.fieldname});
<apex:variable var="c" value="{!sobjfd.fieldname}" />
alert({!c});
//sobj is the list of all the objects we are using like this <apex:pageBlockTable value="{!sobjlst}" var="sobj">
<apex:inputField value="{!sobj.c}"/>
<!-- <apex:inputField value="{!sobjfd.objectName.get(c)}"/>-->
</apex:repeat>
</apex:column>
</apex:pageBlockTable>
list
public List<sObject> sobjlst {get; set;}
My wrapper class :
public class wrapperClass {
public list<Schema.SObjectField> fieldname {get; set;}
public SObject objectName {get; set;}
public wrapperClass(SObject objectName, list<Schema.SObjectField> fieldname) {
this.fieldname = fieldname;
this.objectName = objectName;
}
}
Please do help me how can I display the object with the name of the fields so that it can be inputfield. I need fields in the wrapper to be added as dynamically.