Building Applications with Force.com and VisualForce (DEV401) (二三):Visualforce Componets (Tags) Library Part III
Dev401-024:Visualforce Pages: Visualforce Componets (Tags) Library Part III
Static Resources
1.Static resources are a new kind of Salesforce storage,designed for use with Visualforce.
2.Static resources are items required by your Visualforce pages,such as archives,images,stylesheets,javaScript,etc.
- These resources can be referenced using the $Resource global variable.
- They can be a collection of related files into a directory hierarchy (.zip,.jar).
- This is the recommended method over uploading these files to the Document tab,as these resources can be cached for better performance.
3.Upload files is Setup|Develop|Static Resources.
- There is a 5MB limi per file and a 250MB overall limit for static resources.
Static Resources Components
1.The following tags can all be used ti include other HTML-renderable technologies into your page.
- <apex:flash>
- <apex:image>
- <apex:stylesheet>
2.THese can be stored in the static Resources object or elsewhere on the internet.
Apex:flash
A Flash movie, rendered with the HTML object and embed tags.
<apex:page sidebar="false" showheader="false">
<apex:flash src="http://www.adobe.com/devnet/flash/samples/drawing_1/1_coordinates.swf"
height="300" width="100%" />
</apex:page>
Apex:stylesheet
1.A link to a stylesheet that can be used to style components on the Visualforce page. When specified, this component injects the stylesheet reference into the head element of the generated HTML page.
2.Example
<apex:stylesheet value="/resources/htdocs/css/basic.css"/>
Apex:variable
1.A local variable that can be used as a replacement for a specified expression within the body of the component. Use <apex:variable> to reduce repetitive and verbose expressions within a page.
2.Note:<apex:variable> does not support reassignment inside of an iteration component, such as <apex:dataTable> or <apex:repeat>. The result of doing so, e.g., incrementing the <apex:variable> as a counter, is unsupported and undefined.
Apex:facet
1.A placeholder for content that is rendered in a specific part of the parent component, such as the header or footer of an <apex:dataTable>.
2.An <apex:facet> component can only exist in the body of a parent component if the parent supports facets. The name of the facet component must match one of the pre-defined facet names on the parent component. This name determines where the content of the facet component is rendered. Consequently, the order in which a facet component is defined within the body of a parent component does not affect the appearance of the parent component.
3.See <apex:dataTable> for an example of facets.
Apex:param
1.A parameter for the parent component. The <apex:param> component can only be a child of the following components:
- <apex:actionFunction>
- <apex:actionSupport>
- <apex:commandLink>
- <apex:outputLink>
- <apex:outputText>
- <flow:interview>
2.Within <apex:outputText>, there is support for the <apex:param> tag to match the syntax of the MessageFormat class in Java. See the MessageFormat class JavaDocs for more information.
Visualforce Components & JavaScript Events
1.Many Visualforce tags relate to different UI components.
2.These often have attributes quivalent to Javascript events to handle user actions to those components.
Apex:component
Note that you cannot define attributes with names like id or rendered. These attributes are automatically created for all custom component definitions.
Apex:componentBody
1.This tag allows a custom component author to define a location where a user can insert content into the custom component. This is especially useful for generating custom iteration components. This component is valid only within an <apex:component> tag, and only a single definition per custom component is allowed.
2.Simple Example
<!-- Page: -->
<apex:page>
<apex:outputText value="(page) This is before the custom component"/><br/>
<c:bodyExample>
<apex:outputText value="(page) This is between the custom component" /> <br/>
</c:bodyExample>
<apex:outputText value="(page) This is after the custom component"/><br/>
</apex:page>
<!-- Component: bodyExample -->
<apex:component>
<apex:outputText value="First custom component output" /> <br/>
<apex:componentBody />
<apex:outputText value="Second custom component output" /><br/>
</apex:component>
Exercise 3-6: Creating a Custom Component
1.Goal(s):
- Create a custom component for the slider widget used earlier.
2.Scenario:
- Universal Containers has grown to like the slider widget and wants to use it else where in other pages. However, to make things easier, they want it to be component.
3.Tasks:
- Be sure that the slider flash file is in your static resources.
- Complete the slider component.
- Add the pre-existing Visualforce page tp your org.
- Overrite the Review Edit button.
- Test the page.
Module Review
1.How many controllers can a page have? Where is the controller for a page assigned?
One.
3.What are the names of the coarse metadata tags?
detail,listview
4.which tags should be used to automatically bring in the Salesforce label and default widget for a field?
inputField
5.What are static resources?
styleSheet, JS,CSS
Building Applications with Force.com and VisualForce (DEV401) (二三):Visualforce Componets (Tags) Library Part III的更多相关文章
- Building Applications with Force.com and VisualForce (DEV401) (二一):Visualforce Componets (Tags) Library Part 1
Dev401-022:Visualforce Pages: Visualforce Componets (Tags) Library Part 1 Module Objectives1.List ke ...
- Building Applications with Force.com and VisualForce (DEV401) (二二):Visualforce Componets (Tags) Library Part II
Dev401-023:Visualforce Pages: Visualforce Componets (Tags) Library Part II Apex:pageBlockTable1.A ...
- Building Applications with Force.com and VisualForce(Dev401)(十八):Visualforce Pages: Introduction to Visualforce
Dev401-020:Visualforce Pages: Introduction to Visualforce Course Objectives1.Understand the benefits ...
- Building Applications with Force.com and VisualForce (DEV401) (二十):Visualforce Pages: Visualforce Componets (Tags)
Dev401-021:Visualforce Pages: Visualforce Componets (Tags) Module Agenda1.Tag Basics2.Tag Bindings T ...
- Building Applications with Force.com and VisualForce(Dev401)(十九):Visualforce Pages: Visualforce Componets (Tags)
Dev401-020:Visualforce Pages: Visualforce Componets (Tags) Module Agenda1.Tag Basics2.Tag Bindings T ...
- Building Applications with Force.com and VisualForce(Dev401)(十):Designing Applications for Multiple Users: Building Business Processes that You Want
Dev401-011: Building Business Processes that You Want Course Objectives1.Describe the capabilities o ...
- Building Applications with Force.com and VisualForce (DEV401) (四):Building Your user Interface
Dev 401-004:Application essential:Building Your user Interface: Module Agenda1.Custom Applications2. ...
- Building Applications with Force.com and VisualForce (DEV401) (三):Application Essential:Building Your Data Model
Dev 401-003:Application Essential:Building Your Data Model Object Relationships1.Link two objects- P ...
- Building Applications with Force.com and VisualForce (DEV401) (二) : Application Essentials:Designing Application on the Force.com Platform
Dev 401-002:Application Essentials:Designing Application on the Force.com Platform Course Objectives ...
随机推荐
- 想清楚再入!VR硬件创业能“要你命”
每一次跨时代新产品的出现,总会让科技行业疯狂一阵儿,十年前是智能手机,今天自然是VR.自2015年开始,VR火的越来越让人欣喜,让人兴奋,更让人越来越看不清,越来越害怕.数不清的大小品牌义无反顾的杀入 ...
- UEditor问题整理
网上可以使用的富文本编辑器有很多,但是经过慎(sui)重(shou)思(yi)考(cha),选择了UEditor,毕竟是百度的东西,质量上应该经得起推敲,另外,使用别人的插件,总要去适应别人的编码习惯 ...
- webpack 手动创建项目
前言: webpack作为当前算是比较流行的打包工具之一,通过设置入口文件开始会把入口文件所依赖的所有文件(js,css,image等)进行对应的打包处理,其实现当时真的是很独特.现在流行的脚手架工具 ...
- 达拉草201771010105《面向对象程序设计(java)》第二周学习总结
达拉草201771010105<面向对象程序设计(java)>第二周学习总结 一.理论知识学习部分 这一周我们学习的是书上第三章java的基本程序设计结构的内容,在这一章 ...
- Manjaro 19.01 kde下Tim sogou软件安装问题及解决
我的系统配置 首先第一个问题是,在manjaro下Tim Thunderspeed这种deepin-wine的软件.今天我在装这些软件的时候,安装之后不能打开,闪退.苦恼了我好一会儿.终于找到了解决的 ...
- hw从外网到内网的渗透姿势分享
现在这段时间是全员 hw 时期,刚好前几天也有幸参与了某个地方的 hw 行动,作为攻击方,这里就简单总结一下最近挖洞的思路吧.因为可能怕涉及到敏感的东西,这里就有的地方不会细说了. 因为本人比较菜,所 ...
- vue路由传参页面刷新参数丢失问题解决方案
最近项目中涉及到跨页面传参数和后台进行数据交互,看到需求之后第一反应就是用路由传参来解决:Vue中给我们提供了三种路由传参方式,下面我们一个一个的来看一下: 方法一:params传参: this.$r ...
- layer打开弹窗时传递参数(content:)
在使用layer打开弹窗时,我希望带一些参数过去,进行某些判断.直接就可以用链接+参数的方式即可. js var userGrade=Mrant layer.open({ title: '权限管理', ...
- JAVA基础之IO流知识总结
一.IO流体系图 IO常用的几个流: [I/O流原理作用] Input/Output:输入输出机制 输入机制:允许java程序获取外部设备的数据(磁盘,光盘,网络等). 输出机制:保留java程序中的 ...
- 细说集群技术(Cluster)
今天本人给大家讲解一些我对集群技术一个理解,如有不对的或者讲的不好的可以多多提出,我会进行相应的更改,先提前感谢提出意见的各位了!!! 集群(Cluster)技术:通过此可以用较低的成本获取较高的性能 ...