Skip to content

Instantly share code, notes, and snippets.

<apex:dataList value="{!accounts}" var="account" id="theList">
<apex:outputText value="{!account.name}"/>
</apex:dataList>
string s = '0013000000K7WW2';
2.try{
3. ID sID = s;
4. // if we get here, it's a valid ID and the sID field is an 18 character one
5.} catch (System.StringException e){
6. // if it goes here, it's not an ID. Do something if you need to.
7.}
//MOD of example in http://www.tgerm.com/2010/02/visualforce-salesforce-jquery-ajax-how.html by d3developer (d3developer.com)
<apex:page showHeader="true" standardStylesheets="true" >
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"
type="text/JavaScript" />
<script
public with sharing class EnhancedLookupController extends EnhancedComponentController {
String secondDisplayColumn;
public String displayColumn { get; set; }
public String objectToLookup { get; set; }
public String displayName { get; set; }
public String filterString { get; set; }
public transient List<JsonObject> jsonObjs { get; set; }
public Boolean bigset { get; set; }
try {
queryString += ' where Start_Date_Time__c > ';
startDate = String.escapeSingleQuotes(startDate); //Protection against SOQL Injection
String[] s = startDate.split('/');
for (Integer i=0;i < s.size();i++)
if (s[i].length()==1)
s[i] = '0' + s[i];
queryString += s[2] + '-' + s[0] + '-' + s[1] + 'T00:00:00Z';
whereUsed=true;
<script type="text/javascript" src="{!URLFOR($Resource.JQAutocomplete11,'jquery-autocomplete/jquery.autocomplete.pack.js')}"></script>
<apex:pageBlock id="recordsection" >
<div id="myrecordsection">
<apex:pageBlockSection title="All Assigned Tasks" columns="1">
<apex:pageBlockTable value="{!activePage.pageTasks}" title="Tasks to Review" var="td" id="ttr">
<apex:column headerValue="Name">
<apex:outputField value="{!td.name}"/>
</apex:column>
/* Joel Dietz
[email protected]
03/26/2010
*/
public class TaskController {
public TaskPage activePage { get; set; }
public List<TaskPage> pages { get; set; }
public List<TaskPage> activePages { get; set; }
// see: http://community.salesforce.com/t5/Apex-Code-Development/Building-a-reusable-JSON-component/m-p/172428
// and: http://joe-ferraro.com/2009/04/extjs-vf-json/
public static String getJsonFromObject(String objectName, List<String> columns, String filterString)
{
if(filterString == null)
filterString = '';
String jsonData = '[ ';
try {
<div id="addTask" style="display: none" >
<apex:outputpanel id="atd">
<h2>New Task</h2>
<apex:form >
<apex:panelGrid columns="2" width="85%">