global class MyCustomPickList extends VisualEditor.DynamicPickList{ global override VisualEditor.DataRow getDefaultValue(){ VisualEditor.DataRow defaultValue = new VisualEditor.DataRow('red', 'RED'); return defaultValue; } global override VisualEditor.DynamicPickListRows getValues() { VisualEditor.DataRow value1 = new VisualEditor.DataRow('red', 'RED'); VisualEditor.DataRow value2 = new VisualEditor.DataRow('yellow', 'YELLOW'); VisualEditor.DynamicPickListRows myValues = new VisualEditor.DynamicPickListRows(); myValues.addRow(value1); myValues.addRow(value2); return myValues; } }
The following are methods for DynamicPickList.
public VisualEditor.DataRow getDefaultValue()
Type: VisualEditor.DataRow
public String getLabel(Object attributeValue)
Type: String
public Boolean isValid(Object attributeValue)
Type: Boolean