Skip to main content
deleted 1772 characters in body
Source Link
user7307
  • 87
  • 1
  • 1
  • 12

vfpage

                <apex:actionRegion >
                    <apex:selectList id="chooseColor" value="{!str}" size="1">
                        <apex:selectOption itemValue="Approved" itemLabel="Approved"/>
                        <apex:selectOption itemValue="Rejected" itemLabel="Rejected"/>
                        <apex:selectOption itemValue="Cancel" itemLabel="Cancel"/>
                        <apex:actionSupport event="onchange" reRender="col"/>
                    </apex:selectList> 
                </apex:actionRegion> 
                </apex:column>
                <apex:column id="col" headerValue="Cancel Reason" > 
                    <apex:inputField value="{!le.Lead_Cancel}" />  
                 </apex:column>
                 <apex:column id="col2" headerValue="Reject Reason" > 
                     <apex:inputField value="{!le.Rejected_Details__c}" />  
                 </apex:column>

EDIT : MY CONTROLLER Parents component of selectList : {!str}

public string str{get;set;}

 public NGCC_LeadMassList(ApexPages.StandardSetController Controller){
              lstLead = [SELECT Id,Name,Status, Cancel_Reason__c,Rejected_Reason_c FROM Lead WHERE ID IN:Controller.getSelected()];
        if(lstLead!=null && lstLead.size()>0){
            for(Lead obj : lstLead){
                obj.Status = 'Approved';
            }
        }    
    }
    public pageReference save1()
    {
    
     if(lstLead!=null)
       {
        for(Lead l:lstLead)
        {
            l.Status=str;
            records.add(l);
        }
        update records ;
       }

vfpage

                <apex:actionRegion >
                    <apex:selectList id="chooseColor" value="{!str}" size="1">
                        <apex:selectOption itemValue="Approved" itemLabel="Approved"/>
                        <apex:selectOption itemValue="Rejected" itemLabel="Rejected"/>
                        <apex:selectOption itemValue="Cancel" itemLabel="Cancel"/>
                        <apex:actionSupport event="onchange" reRender="col"/>
                    </apex:selectList> 
                </apex:actionRegion> 
                </apex:column>
                <apex:column id="col" headerValue="Cancel Reason" > 
                    <apex:inputField value="{!le.Lead_Cancel}" />  
                 </apex:column>
                 <apex:column id="col2" headerValue="Reject Reason" > 
                     <apex:inputField value="{!le.Rejected_Details__c}" />  
                 </apex:column>

EDIT : MY CONTROLLER Parents component of selectList : {!str}

public string str{get;set;}

 public NGCC_LeadMassList(ApexPages.StandardSetController Controller){
              lstLead = [SELECT Id,Name,Status, Cancel_Reason__c,Rejected_Reason_c FROM Lead WHERE ID IN:Controller.getSelected()];
        if(lstLead!=null && lstLead.size()>0){
            for(Lead obj : lstLead){
                obj.Status = 'Approved';
            }
        }    
    }
    public pageReference save1()
    {
    
     if(lstLead!=null)
       {
        for(Lead l:lstLead)
        {
            l.Status=str;
            records.add(l);
        }
        update records ;
       }
added 90 characters in body
Source Link
Rao
  • 16.8k
  • 13
  • 69
  • 108

EDIT : MY CONTROLLER Parents component of selectList : {!str} public string str{get;set;}

public NGCC_LeadMassList(ApexPages.StandardSetController Controller){ lstLead = [SELECT Id,Name,Status, Cancel_Reason__c,Rejected_Reason_c FROM Lead WHERE ID IN:Controller.getSelected()]; if(lstLead!=null && lstLead.size()>0){ for(Lead obj : lstLead){ obj.Status = 'Approved'; } }
} public pageReference save1() {

public string str{get;set;}

 public NGCC_LeadMassList(ApexPages.StandardSetController Controller){
              lstLead = [SELECT Id,Name,Status, Cancel_Reason__c,Rejected_Reason_c FROM Lead WHERE ID IN:Controller.getSelected()];
        if(lstLead!=null && lstLead.size()>0){
            for(Lead obj : lstLead){
                obj.Status = 'Approved';
            }
        }    
    }
    public pageReference save1()
    {
    
     if(lstLead!=null)
       {
        for(Lead l:lstLead)
        {
            l.Status=str;
            records.add(l);
        }
        update records ;
       }

EDIT : MY CONTROLLER Parents component of selectList : {!str} public string str{get;set;}

public NGCC_LeadMassList(ApexPages.StandardSetController Controller){ lstLead = [SELECT Id,Name,Status, Cancel_Reason__c,Rejected_Reason_c FROM Lead WHERE ID IN:Controller.getSelected()]; if(lstLead!=null && lstLead.size()>0){ for(Lead obj : lstLead){ obj.Status = 'Approved'; } }
} public pageReference save1() {

 if(lstLead!=null)
   {
    for(Lead l:lstLead)
    {
        l.Status=str;
        records.add(l);
    }
    update records ;
   }

EDIT : MY CONTROLLER Parents component of selectList : {!str}

public string str{get;set;}

 public NGCC_LeadMassList(ApexPages.StandardSetController Controller){
              lstLead = [SELECT Id,Name,Status, Cancel_Reason__c,Rejected_Reason_c FROM Lead WHERE ID IN:Controller.getSelected()];
        if(lstLead!=null && lstLead.size()>0){
            for(Lead obj : lstLead){
                obj.Status = 'Approved';
            }
        }    
    }
    public pageReference save1()
    {
    
     if(lstLead!=null)
       {
        for(Lead l:lstLead)
        {
            l.Status=str;
            records.add(l);
        }
        update records ;
       }
added 688 characters in body
Source Link
user7307
  • 87
  • 1
  • 1
  • 12

I have bee trying to render a field based on lead status value like 'Cancel/Rejected'. if i select Cancel value it should display field A, if i select value Reject it should display field B. please take a look at my visualforce page. What am i missing ?

vfpage

                <apex:actionRegion >
                    <apex:selectList id="chooseColor" value="{!str}" size="1">
                        <apex:selectOption itemValue="Approved" itemLabel="Approved"/>
                        <apex:selectOption itemValue="Rejected" itemLabel="Rejected"/>
                        <apex:selectOption itemValue="Cancel" itemLabel="Cancel"/>
                        <apex:actionSupport event="onchange" reRender="col"/>
                    </apex:selectList> 
                </apex:actionRegion> 
                </apex:column>
                <apex:column id="col" headerValue="Cancel Reason" > 
                    <apex:inputField value="{!le.Lead_Cancel}" />  
                 </apex:column>
                 <apex:column id="col2" headerValue="Reject Reason" > 
                     <apex:inputField value="{!le.Rejected_Details__c}" />  
                 </apex:column>

EDIT : MY CONTROLLER Parents component of selectList : {!str} public string str{get;set;}

public NGCC_LeadMassList(ApexPages.StandardSetController Controller){ lstLead = [SELECT Id,Name,Status, Cancel_Reason__c,Rejected_Reason_c FROM Lead WHERE ID IN:Controller.getSelected()]; if(lstLead!=null && lstLead.size()>0){ for(Lead obj : lstLead){ obj.Status = 'Approved'; } }
} public pageReference save1() {

 if(lstLead!=null)
   {
    for(Lead l:lstLead)
    {
        l.Status=str;
        records.add(l);
    }
    update records ;
   }

I have bee trying to render a field based on lead status value like 'Cancel/Rejected'. if i select Cancel value it should display field A, if i select value Reject it should display field B. please take a look at my visualforce page. What am i missing ?

vfpage

                <apex:actionRegion >
                    <apex:selectList id="chooseColor" value="{!str}" size="1">
                        <apex:selectOption itemValue="Approved" itemLabel="Approved"/>
                        <apex:selectOption itemValue="Rejected" itemLabel="Rejected"/>
                        <apex:selectOption itemValue="Cancel" itemLabel="Cancel"/>
                        <apex:actionSupport event="onchange" reRender="col"/>
                    </apex:selectList> 
                </apex:actionRegion> 
                </apex:column>
                <apex:column id="col" headerValue="Cancel Reason" > 
                    <apex:inputField value="{!le.Lead_Cancel}" />  
                 </apex:column>
                 <apex:column id="col2" headerValue="Reject Reason" > 
                     <apex:inputField value="{!le.Rejected_Details__c}" />  
                 </apex:column>

I have bee trying to render a field based on lead status value like 'Cancel/Rejected'. if i select Cancel value it should display field A, if i select value Reject it should display field B. please take a look at my visualforce page. What am i missing ?

vfpage

                <apex:actionRegion >
                    <apex:selectList id="chooseColor" value="{!str}" size="1">
                        <apex:selectOption itemValue="Approved" itemLabel="Approved"/>
                        <apex:selectOption itemValue="Rejected" itemLabel="Rejected"/>
                        <apex:selectOption itemValue="Cancel" itemLabel="Cancel"/>
                        <apex:actionSupport event="onchange" reRender="col"/>
                    </apex:selectList> 
                </apex:actionRegion> 
                </apex:column>
                <apex:column id="col" headerValue="Cancel Reason" > 
                    <apex:inputField value="{!le.Lead_Cancel}" />  
                 </apex:column>
                 <apex:column id="col2" headerValue="Reject Reason" > 
                     <apex:inputField value="{!le.Rejected_Details__c}" />  
                 </apex:column>

EDIT : MY CONTROLLER Parents component of selectList : {!str} public string str{get;set;}

public NGCC_LeadMassList(ApexPages.StandardSetController Controller){ lstLead = [SELECT Id,Name,Status, Cancel_Reason__c,Rejected_Reason_c FROM Lead WHERE ID IN:Controller.getSelected()]; if(lstLead!=null && lstLead.size()>0){ for(Lead obj : lstLead){ obj.Status = 'Approved'; } }
} public pageReference save1() {

 if(lstLead!=null)
   {
    for(Lead l:lstLead)
    {
        l.Status=str;
        records.add(l);
    }
    update records ;
   }
Source Link
user7307
  • 87
  • 1
  • 1
  • 12
Loading