0

I am rendering the dynamic component based on the profile the problem is when its loaded it shows the dynamic component in that not the fields which i have in the dynamic component.Below is the code that i have used.I think i am missing something to add while calling the dynamic component please help.

Below is the code that i have added in the parent component helper:

 doBooleanCheck :function(component,event,helper) {
  var action = component.get('c.isrendered');
 action.setCallback(this, function(response){
        var state = response.getState();
        if (state === "SUCCESS") {
            component.set("v.myBool", response.getReturnValue());
            var boolval=component.get("v.myBool");
            if(boolval===true)
            {
                $A.createComponent(
               "c:SGDoveAuditWizard",
                    {               


                    },function (cmp, status) {
        if (component.isValid() && status === 'SUCCESS') {
            var body = component.get("v.body");
            body.push(cmp);
            alert(body);
            component.set("v.body", body);    
        }
    });
            }
        } else if (state === "ERROR") {
            alert('Error : ' + JSON.stringify(response.getError()));
        }
  });
     $A.enqueueAction(action);
},

Thanks!!

0

When you use cmp.set("v.body", ...) to set the component body, you must explicitly include {!v.body} in your component markup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.