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
rupesh ranjanrupesh ranjan 

Want to GET Value in Picklist from other service Rest API

I want to fetch value in pick list instead of coloumn table





<apex:page controller="Calloutcontroller" sidebar="false" showheader="false" title="JSON table" >

<apex:form >
<apex:commandButton value="Proceed with Selected" action="{!ProceedWithSelected}"/>

<apex:pageBlock >
<apex:pageBlockTable value="{!performcallout}" var="wrap" width="100%"  rendered="{!normalList}">
<apex:column headerValue="Name" value="{!wrap.Name}"/>

<apex:column headerValue="AccountNumber" value="{!wrap.AccNumber}"/>

<apex:column headerValue="Source" value="{!wrap.Source}"/>

<apex:column headerValue="Website" value="{!wrap.Site}"/>

<apex:column headerValue="Email" value="{!wrap.Email}"/>
<apex:column >
                   <apex:inputCheckbox value="{!wrap.selected}"/>
</apex:column>

</apex:pageBlockTable>
<apex:panelGrid columns="2">
<apex:pageBlockTable value="{!selectedWrapperList}"  var="wrap" width="100%" rendered="{!selectedList}">

<apex:column headerValue="Name" value="{!wrap.Name}"/>

<apex:column headerValue="AccountNumber" value="{!wrap.AccNumber}"/>
<apex:column headerValue="Source" value="{!wrap.Source}"/>
</apex:pageBlockTable>

<apex:pageBlockTable value="{!selectedWrapperList}"  var="wrap" width="100%" rendered="{!selectedList}">

<apex:column headerValue="Website" value="{!wrap.Site}"/>

<apex:column headerValue="Email" value="{!wrap.Email}"/>
<apex:column >
                   <apex:inputCheckbox value="{!wrap.selected}"/>
</apex:column>

</apex:pageBlockTable>

<apex:commandButton value="Done"/>
</apex:panelGrid>
</apex:pageBlock>

</apex:form>

</apex:page>

------------------------------------Controller-------------------------------------------------


public class Calloutcontroller{


     public List<consolewrap> ConsoleWrapperList{get;set;} 
     public List<consolewrap> getperformcallout(){
      ConsoleWrapperList = new List<consolewrap>();
       HttpRequest req = new HttpRequest(); 
       HttpResponse res = new HttpResponse();
        Http http = new Http(); 
        req.setEndpoint('https://raw.githubusercontent.com/parthiban019/samplejson/master/student.json'); 
        req.setMethod('GET');
         res = http.send(req);
          if(res.getstatusCode() == 200 && res.getbody() != null){ ConsoleWrapperList=(List<consolewrap>)json.deserialize(res.getbody(),List<consolewrap>.class);
           }
            return consolewrapperlist; 
            }
            
            
            
             }
VinodKRVinodKR
Hi Rupesh,

Please detail your quetion.

Thanks,