You need to sign in to do that
Don't have an account?
rupesh 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;
}
}
<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;
}
}
Please detail your quetion.
Thanks,