Created
October 21, 2013 03:12
-
-
Save kiran-machhewar/7078125 to your computer and use it in GitHub Desktop.
ConsoleController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public without sharing class ConsoleController{ | |
public List<Log__c> logList {set;get;} | |
public ConsoleController(){ | |
logList = new List<Log__c>(); | |
} | |
public PageReference refreshLogs(){ | |
String logId = ApexPages.currentPage().getParameters().get('logid'); | |
System.debug('LogId'+logId); | |
if(logId!=null){ | |
logId=logId.replaceAll('"',''); //Clean the id obtained from page | |
List<Log__c> logs = [Select Id,Name,Log_Body__c,Log_Type__c,Title__c,User_Name__c From Log__c where Id=:logId]; | |
if(logs!=null&&logs.size()>0){ | |
logList.add(logs[0]); | |
} | |
} | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment