I am passing a list to the pageblock table and my table looks like below
i want to edit the table values. I tried the below code. This is my VF Page code
<apex:pageBlockSection id="section2" columns="2" collapsible="true" title="Configure Complexity">
<apex:pageBlockTable style="margin-left: 80%;width:30%" value="{!LMComplexity}" var="com">
<apex:inlineEditSupport showOnEdit="update, cancelButton"
hideOnEdit="editButton" event="ondblclick"
changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"></apex:inlineEditSupport>
<apex:column headerValue="Class" value="{!com.Class__c}" />
<apex:column headerValue="Maximum Days" value="{!com.Maximum_Complexity_Score__c}"/>
<apex:column headerValue="Minimum Days" value="{!com.Minimum_Complexity_Score__c}"/>
</apex:pageBlockTable>
<apex:commandButton id="update" action="{!quickUpdat}"/>
</apex:pageBlockSection>
and my controller code looks like this
public class profileList {
public profileList(ApexPages.StandardController controller) {}
public List <LM_Default_Weightage__mdt> result{get;set;}
Boolean testval = false;
public profileList() {
result= Database.query('Select Class__c, Maximum_Complexity_Score__c,Minimum_Complexity_Score__c From LM_Default_Complexity__mdt');
}
public PageReference quickUpdat() {
try {
return ApexPages.CurrentPage();
} catch(Exception e) {
System.debug('@@@Error');
return null;
}
}
public list<LM_Default_Complexity__mdt> getLMComplexity() {
List<LM_Default_Complexity__mdt> comp= [Select Class__c, Maximum_Complexity_Score__c,Minimum_Complexity_Score__c From LM_Default_Complexity__mdt];
return comp;
}
}
So basically i am querying my custom metadata put it in a list and returned it.Finally displaying the returned list in pageblock table. Is the table editable?
Note: I tried directly passing the custom metadata and i cannot edit the table.Custom metadata isn't editable