To put you on perspective, I've created a Detail Page Button that displays in a new window some result data from a callout to a SOAP web service.
The thing is, I've tried it in a sanbox, and it works perfectly. It displays the data in JSON format (for testing) and then in a display block after deserialize the JSON:
However, surprisingly for me, I've repeated the process in another Sandbox (adjusting of course the code to the new objects attributes name in the new sandbox) and the result is as follow:
This is the code for the Apex page:
<apex:page controller="AlumnosFromOP_Controller">
<apex:pageBlock title="Listado de alumnos matriculados">
<apex:outputText style="font-style:italic" value="Información de todos los alumnos matriculados en el Grupo: {0} ({1}).">
<apex:param value="{!groupName}"/>
<apex:param value="{!groupID}"/>
</apex:outputText>
</apex:pageBlock>
<apex:pageBlock title="Test">
<apex:outputText style="font-style:italic" value="{0}">
<apex:param value="{!testVar}"/>
</apex:outputText>
</apex:pageBlock>
<apex:pageBlock title="Students">
<apex:pageBlockTable value="{!alumnosList}" var="alumno">
<apex:column value="{!alumno.nombre__c}"/>
<apex:column value="{!alumno.Primer_Apellido__c}"/>
<apex:column value="{!alumno.email__c}"/>
<apex:column value="{!alumno.DNI__c}"/>
</apex:pageBlockTable>
</apex:pageBlock>
And the code in the Controller where the callout is made:
public class AlumnosFromOP_Controller
{
public String groupID{get;set;}
public String groupName{get;set;}
public String testVar{get;set;}
public List<Alumno__c> alumnosList{get;set;}
//Constructor
public AlumnosFromOP_Controller(){
groupID = ApexPages.currentPage().getParameters().get('gID');
groupName = ApexPages.currentPage().getParameters().get('gNombre');
alumnosList = new List<Alumno__c>();
String myJSON = getAlumnosFromOP(groupID);
testVar = myJSON;
alumnosList = (List<Alumno__c>)JSON.deserialize(myJSON, List<Alumno__c>.class);
}
private String getAlumnosFromOP(String groupID)
{
try{
//Open connection with SOAP web service
OP_SF_Interaction.OP_SF_InteractionPort stub = new OP_SF_Interaction.OP_SF_InteractionPort();
......
So, as in both cases, the JSON is well returned from the callout to the SOAP web service, I'm assumning ¿the bug is in the process of deserializing the JSON?; is the List alumnosLIst the one is displaying in the first case but not displaying in the second one
But it's odd, because the JSON deserializing doesn't creates any exception or error.
I'm running out of ideas...
UPDATE
A comparison of the debugging in both sandbox, just in case it helps.