function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sk kumarsk kumar 

i hav .my requirement is like if i select the cpu node it will show the cpu details near the node. similarly if i select N/W & Monitor it will show their deatails.so any one plz provide code & logic for this requirement..thnx

vfpage-

<apex:page standardController="Account" extensions="productconfig1">
  <apex:form >
  
   <apex:pageblock >
           <apex:panelGrid columns="5">
            Select Node &nbsp;<apex:selectList size="1" value="{!SelectedNode}">
                   <apex:selectOptions value="{!SelectedNodes}"/>
                  <apex:actionSupport event="onchange" reRender="a"/>
              </apex:selectList> 
               &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Select Product &nbsp;<apex:selectList size="1" value="{!product}" id="a">
                   <apex:selectOptions value="{!products}"/>
                   <apex:actionSupport event="onclick" reRender="Details"/>
                 </apex:selectList>
         </apex:panelGrid>
         <apex:outputPanel id="Details">
             <apex:outputText value="The Product you Selected is {!product} " rendered="{!product != null}" />
         </apex:outputPanel>
      </apex:pageblock>
    
    </apex:form>

</apex:page>


Controller--

public with sharing class productconfig1
{
      Public String SelectedNode{get;set;}
     Public String Product{get;set;}
      Public String SelectedProduct{get;set;}
      
         public productconfig1(ApexPages.StandardController controller){
       
        }

  
     public List<SelectOption> getSelectedNodes()
   {
        List<SelectOption> options = new List<SelectOption>();
        options.add(new SelectOption('None','--- None ---'));     
        options.add(new SelectOption('N1','N1'));
        options.add(new SelectOption('N2','N2'));
        options.add(new SelectOption('N3','N3'));     
        return options;
    }
  
    public List<SelectOption> getProducts()
    {
      List<SelectOption> options = new List<SelectOption>();
      if(SelectedNode == 'N1')
      {    
          options.add(new SelectOption('CPU','CPU'));
            options.add(new SelectOption('MOUSE','MOUSE'));
        }
        else if(SelectedNode == 'N2')
      {    
            options.add(new SelectOption('N/W','N/W'));
         
        }
       else if(SelectedNode == 'N3')
       {    
           options.add(new SelectOption('MONITOR','MONITOR'));
        
       }
       else
       {
             options.add(new SelectOption('None','--- None ---'));
        }   
        return options;
     }    

    }
Gopal RathoreGopal Rathore
Hi sk kumar,
What Is Your Exact Requirment.
What Do You Want ?.

Regards
Gopal Rathore