在Salesforce中向Page Layout中添加Visualforce Page
在Salesforce中可以向Object所对应的Layout中添加我们自定义的Visualforce Page。 此时的Visualforce Page与Asp.Net MVC中的Partial View有着异曲同工的妙处。
那么如何完成整个流程呢?请看如下操作步骤:
1):在自定义的Visualforce Page中要添加如下标签
【standardController标志此Page可以添加到哪个Object所对应的Layout中】
【extensions指定了对应的后台Class文件】
<apex:page standardController="Account" extensions="CreditLimitController">
2):处理后台的Class文件,完成我们所需要的特定逻辑
【ApexPages.StandardController与Page中指定的standardController向对应】
【(Account)controller.getRecord()获取了当前操作的Object,这里指向的是Account,实质上获取的是该对象的id,若要获取其他更加详细的信息,需要根据id进行query】
public class CreditLimitController {
//added an instance varaible for the standard controller
private ApexPages.StandardController controller {get; set;}
// the actual account
private Account a;
public CreditLimitController(ApexPages.StandardController controller) {
//initialize the stanrdard controller
this.controller = controller;
this.a = (Account)controller.getRecord();
system.debug('---------002Account Id ' + this.a.Id);
}
}
3):上2个步骤已经将自定义的Visualforce Page准备完毕,接下来我们进入Account所对应的Page Layout中,如下图所示

4):点击上图的Edit按钮,在Fields中找到Section,手动拖拽一个Section到指定的位置

5):在Visualforce Pages中我们可以看到我们刚刚创建的Page(CreditLimit),然后用拖拽的方式将此Page添加到刚刚添加的Section中

这样我们就完成了将自定义的Visualforce Page添加到指定的Page Layout中。
更多详细的内容,请看如下链接:
http://blog.jeffdouglas.com/2009/05/08/inline-visualforce-pages-with-standard-page-layouts/
http://blogs.developerforce.com/systems-integrator/2008/11/adding-a-visualforce-page-to-a-page-layout.html
http://help.salesforce.com/apex/HTViewSolution?id=000004503&language=en_US
在Salesforce中向Page Layout中添加Visualforce Page的更多相关文章
- Android中查找一个Layout中指定的子控件
我们通常希望查找一个页面中指定类型的控件,单个控件知道id很容易找到,但是如果是多个呢?或者说是在程序中自定义的控件,且不知道id怎么办呢?如想找到页面中的Spinner,可用以下方法 /** * 从 ...
- salesforce零基础学习(九十四)classic下pagelayout引入的vf page弹出内容更新此page layout
我们在classic环境中,有时针对page layout不能实现的地方,可以引入 一个vf page去增强标准的 page layout 功能,有时可能要求这个 vf page的部分修改需要更新此 ...
- 转载 SharePoint 2013配置Master Page and Page Layout
转载原地址: http://www.cnblogs.com/huangjianwu/p/4539706.html 涉及到的内容是关于SharePoint 2013如何部署自定义的母版页和布局页. 进入 ...
- Page Layout里的javascript (jquery)不执行
在page layout 中通过 _spBodyOnLoadFunctionNames.push("js 方法名") 的方式实现. 但切记,代码要放到 PlaceHolderMai ...
- Salesforce随笔: 将Visualforce Page渲染为PDF文件(Render a Visualforce Page as a PDF File)
参照 : Visualforce Developer Guide 第60页 <Render a Visualforce Page as a PDF File> 你可以用PDF渲染服务生成一 ...
- SharePoint 2013 Deploy Master Page And Page Layout
2013年9月27日的一篇随笔,其实也是自己编写的部署文档,由于客户是HK的,所以描述部分是用英文. 涉及到的内容是关于SharePoint 2013如何部署自定义的母版页和布局页. First, L ...
- Creating a Custom Page Layout in SharePoint 2013
Creating a Custom Page Layout in SharePoint 2013 In my last article, I documented how to create a Ma ...
- 【转】iOS6中的Auto Layout:通过代码添加约束
最近做的项目用到了Auto Layout,于是经过了一番大量的google,这是我看到的讲用代码创建约束最清晰的一篇教程,于是想跟更多的人分享一下.原文也比较简单,可以直接过去看,如果我翻译的 ...
- 往Layout中动态添加View
需要注意几个方法:基本上所有的方法参数单位是px 1.设置View的宽高: LinearLayout.LayoutParams params = new LinearLayout().LayoutPa ...
随机推荐
- Best Meeting Point
Total Accepted: 701 Total Submissions: 1714 Difficulty: Medium A group of two or more people wants t ...
- C#之new修饰符
转自MSDN:https://msdn.microsoft.com/zh-cn/library/435f1dw2.aspx new隐藏基类成员 在用作修饰符时,new关键字可以显式的隐藏从基类继承的 ...
- 解读Unity中的CG编写Shader系列七(不透明度与混合)
转自http://www.itnose.net/detail/6098539.html 1.不透明度 当我们要将两个半透的纹理贴图到一个材质球上的时候就遇到混合的问题,由于前面的知识我们已经知道了片段 ...
- 使用ssh正向连接、反向连接、做socks代理的方法
ssh -L 219.143.16.157:58080:172.21.163.32:8080 用户名@localhost -p 10142 在 219.143.16.157机器执行 将ssh隧 ...
- tableView滚到最后一行
dispatch_async(dispatch_get_main_queue(), ^{ [_tableview scrollToRowAtIndexPath:[NSIndexPath indexPa ...
- September 19th 2016 Week 39th Monday
We come nearest to the great when we are great in humility. 我们最为谦逊的时候越接近伟大. When you are powerful en ...
- ZooKeeper 配置文件(zoo.cfg)详解
参数名 说明 clientPort 客户端连接server的端口,即对外服务端口,一般设置为2181吧. dataDir 存储快照文件snapshot的目录.默认情况下,事务日志也会存储在这里.建议同 ...
- Mysql控制语句
14.6.5.1 CASE Syntax 14.6.5.2 IF Syntax 14.6.5.3 ITERATE Syntax 14.6.5.4 LEAVE Syntax 14.6.5.5 LOOP ...
- file标签选择文件change事件失效处理方法
file只能处罚一次change事件,在change事件中重新替换file标签即可生效 eg: $(function(){ //上传图片 $("body").on("ch ...
- 谈谈我的编程之路---WAMP(一)
WAMP的一些配置与使用心得(PHP) 记得第一次接触PHP的时候,我都不知道PHP为什么要大写,但是我却用它来进行工作了,有时候生活就是一场美丽的邂逅 青涩的我,在ES哥的引领下,第一次接触到了WA ...