I have a Tab which contains list of records and actions. they i will have three actions like Approve,Reject and Need more Info. on click of Reject i will show an Modal popup which will have a Comments Field. User will enter his comments in that text box and he will click on submit(Values will store temporary, those values will not update in database). then i am storing that text field value in Json Array in controller. now i want to show that text box value after clicking on Reject button. Below i am sharing my code.

// for reject
openrejModel: function(component, event, helper) {
    var idx = event.getSource().get("v.value");// getting record id on click of reject button
    component.set("v.isRejectOpen", true); 
closerejModel: function(component, event, helper) {

    component.set("v.isRejectOpen", false);

rejcomment : function(component, event, helper) 
    var flow = component.find("flowIDFbulk");        
    var inputVariables = {

        var obj = {};
        obj["name"] = 'IC_Review_Action_RB';
        obj["value"] = 'Reject';
        obj["RecordId"] = component.get("v.rejIDFValue");
        obj["Comments"] = component.find("RejectComments").get("v.value");
         for(var i = 0; i < inputVariables.Reject.length; i++)
               if(inputVariables.Reject[i].RecordId == component.get("v.rejIDFValue"))
                   var comnt = inputVariables.Reject[i].Comments;
    component.set("v.isRejectOpen", false);

MY Component:

 <!-- Model Popup for Reject -->
<aura:if isTrue="{!v.isRejectOpen}">
  <div role="dialog" tabindex="-1" aria-labelledby="header99" class="slds-modal slds-fade-in-open ">
    <div class="slds-modal__container">
      <div class="slds-modal__header">
        <button class="slds-button slds-modal__close slds-button--icon-inverse" title="Close" onclick="{!c.closerejModel}">
        <span class="slds-assistive-text">Close</span>
        <h2 id="header99" class="slds-text-heading--medium">Reject</h2>
     <div class="slds-modal__content slds-p-around--medium">
            <ui:inputTextArea aura:id="RejectComments" label="Comments" rows="5"/>                
       <div class="slds-modal__footer">
        <button class="slds-button slds-button--neutral" onclick="{!c.closerejModel}" >Cancel</button>
        <button class="slds-button slds-button--brand" onclick="{!c.rejcomment}">Submit</button>
  <div class="slds-backdrop slds-backdrop--open"></div>
<td scope="row">
             <lightning:buttonIcon iconName="utility:close" variant="bare" onclick="{!c.openrejModel}" value="{!idf.Base_Invention_Disclosure__c}" alternativeText="Recject Inention Disclosure" />&nbsp;



You must log in to answer this question.

Browse other questions tagged .