This file contains hidden or 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 class JSONObject { | |
/* | |
Copyright (c) 2002 JSON.org | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the 'Software'), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains hidden or 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
// http://www.sundog.net/sunblog/posts/a-handy-method-for-converting-15-character-id-strings-in-salesforce-to-18-c/ | |
public string generate18CharId(string id){ | |
// This method will take a 15 character ID and return its 18 character ID: | |
if (id == null){ | |
return null; | |
} | |
if (id.length() != 15) { |
This file contains hidden or 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
/* ============================================================ | |
* This code is part of the "apex-lang" open source project avaiable at: | |
* | |
* http://code.google.com/p/apex-lang/ | |
* | |
* This code is licensed under the Apache License, Version 2.0. You may obtain a | |
* copy of the License at: | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* ============================================================ |
This file contains hidden or 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
http://blog.sforce.com/sforce/2010/05/url-rewriting-for-your-customizing-your-site-urls.html | |
global class ApexClassName implements Site.UrlRewriter { | |
global PageReference mapRequestUrl(PageReference externalUrl) {//} | |
global List<PageReference> generateUrlFor(List<PageReference> myForcedotcomUrls) {//...} | |
} |
This file contains hidden or 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
<apex:page controller="popup"> | |
<apex:form > | |
<apex:commandButton value="Show Pop up" action="{!showPopup}" rerender="popup"/> | |
<apex:pageBlock > | |
Lorem ipsum ..... dummy stuff to show the popup is above content | |
</apex:pageBlock> | |
<apex:outputPanel id="popup"> | |
<apex:outputPanel styleClass="customPopup" layout="block" rendered="{!displayPopUp}"> | |
Lorem ipsum <br/><br/><br/> |
This file contains hidden or 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 class popup { | |
public boolean displayPopup {get; set;} | |
public void closePopup() { | |
displayPopup = false; | |
} | |
public void showPopup() { | |
displayPopup = true; |
This file contains hidden or 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
/* | |
[email protected] | |
creates entities required for testing. | |
*/ | |
public with sharing class TestUtility { | |
/* | |
A random user is useful for testing in order to be | |
sure that you are able to see data across posts regardless |
This file contains hidden or 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
<apex:enhancedList type="Account" height="300" rowsPerPage="10" id="AccountList" /> |
This file contains hidden or 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
<apex:dataTable value="{!accounts}" var="account" id="theTable"> | |
<apex:facet name="caption">table caption</apex:facet> | |
<apex:facet name="header">table header</apex:facet> | |
<apex:facet name="footer">table footer</apex:facet> | |
<apex:column> | |
<apex:facet name="header">Name</apex:facet> | |
<apex:facet name="footer">column footer</apex:facet> | |
<apex:outputText value="{!account.name}"/> | |
</apex:column> | |
<apex:column> |