+ Start a Discussion
NjangaNjanga 

Posting selectList Values

Hi guys, am stuck here, can someone help me please;

 

I have 2 selectList, one for unassigned processes and another for assigned processes;

so far i can move processes from unassigned to assigned and also am able to re-order them using jquery .

 

This is my code;

 

******************************  vf page*********************************

 

 

<apex:panelGrid columns="3" id="ad1">
                <apex:panelGroup >
                <u> <apex:outputText style="font-size:16px;" value="Unassigned Processes" /></u><br/><br/>
                   <select multiple="false" id="select1" style="width:350px" size="10">
                     <apex:repeat value="{!Ovalues}" var="Opt" >
                         <option value="{!Opt}"> {!Opt}</option>
                      </apex:repeat>  
                    </select><br/>
                     <input type = "image" src="{!$Resource.up}" style="width:30px;height:20" id ="up" />
                     <input type = "image" src="{!$Resource.down}" style="width:30px;height:20" id ="down" />
                </apex:panelGroup>
                <apex:panelGroup >
                    <br/><br/><br/><br/><br/>
                    <input type = "image" src="{!$Resource.right}" style="width:30px;height:20" id ="left" />
                        
                    <br/>
                    <br/>
                    <input type = "image" src="{!$Resource.left}" style="width:30px;height:20" id ="right" />
                </apex:panelGroup>
                <apex:panelGroup >
                 <u><apex:outputText style="font-size:16px;" value="Assigned Processes" /></u><br/><br/>
                   <select multiple="true" id="select2" style="width:350px" size="10">
                     <apex:repeat value="{!assigned}" var="Opt" >
                         <option value="{!Opt}"> {!Opt}</option>
                      </apex:repeat>  
                    </select><br/>
                   <input type = "image" src="{!$Resource.up}" style="width:30px; height:20" id ="rup" />
                   <input type = "image" src="{!$Resource.down}" style="width:30px; height:20" id ="rdown" />
                   <br/><br/><br/><br/>
                   <apex:commandButton value="Save" action="{!save}"/>
                    <apex:commandButton value="Cancel"/>
                </apex:panelGroup>
            
        </apex:panelGrid>

 

 

********************************* controller*********************************************

 

 

public class ProcessController {

 
     Set<String> originalvalues = new Set<String>{'Include Unsubscribe',
                                                  'Authority to Represent',
                                                  'NDA Needed',
                                                  'References needed',
                                                  'P33 Interview',
                                                  'Submit CV to Client',
                                                  'Client Interview',
                                                  'Optain Offer'};
                                                  

 
   public Set<String> assigned {get;set;}
   

                                                  
   public Set<String> getOvalues(){
    
    return originalvalues;
   
    }
    
    
    
    public ProcessController(){
        String id = ApexPages.currentPage().getParameters().get('id');
            if(id !=''){
            JobApplicant_ATS__c applicant = [Select Applicant_Name__c From JobApplicant_ATS__c where id=:id];
            
            ApplicantName = applicant.Applicant_Name__c;
            List<ApplicantAssignedProcess__c> asspro = [Select Process__c,Level__c,ApplicantId__c From
                                                        ApplicantAssignedProcess__c Where ApplicantId__c=:id Order By Level__c];
            
            assigned = new Set<String>();
            if(asspro.size()!=0){
            
                for(ApplicantAssignedProcess__c asp:asspro){
                
                    assigned.add(asp.Process__c);
                
                
                }
            
            }
          }   
      }
      
      
  }

 

Big VBig V

post ur jquery code as well. Will let u know how to use <apex:selectlist> inorder to post the select list