Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @AuraEnabled
- public static List<SelectOption> ObjectNames()
- {
- system.debug('object is calling:::');
- List<SelectOption> ObjNames= new List<SelectOption>();
- ObjNames.add(new SelectOption('','--None--'));
- ObjNames.add(new selectoption('Pay_Element_Master__c','Pay Element'));
- ObjNames.add(new selectoption('CTC_Master__c','CTC Master'));
- ObjNames.add(new selectoption('Section_Master__c','Section Master'));
- return ObjNames;
- public class SelectOption {
- public SelectOption(String value, String label) {
- this.value = value;
- this.label = label;
- this.disabled = false;
- this.escapeItem = false;
- }
- public SelectOption(String value, String label, Boolean isDisabled) {
- this.value = value;
- this.label = label;
- this.disabled = isDisabled;
- this.escapeItem = false;
- }
- @AuraEnabled
- public String label { get;set; }
- @AuraEnabled
- public String value { get;set; }
- @AuraEnabled
- public Boolean disabled { get;set; }
- @AuraEnabled
- public Boolean escapeItem { get;set; }
- componentVal:function(component,event,helper){
- alert('iam component calling:::');
- var action=component.get("c.ObjectNames");
- action.setCallback(this,function(re){
- var state=re.getState();
- if(state==='SUCCESS'){
- alert(':::::::'+JSON.stringify(re.getReturnValue()));
- }
- });
- $A.enqueueAction(action);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement