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

A custom Visualforce component. All custom component definitions must be wrapped inside a single <apex:component> tag.
 
Apex:attribute
A definition of an attribute on a custom component. The attribute tag can only be a child of a component tag.

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.

2.There are a series of layout components that all help recreate the traditional Salesforce page layout style very easily. What name do they share?
pageBlockTable,pageBlcokSection,block

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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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. ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. unittest实战(四):用例编写

    import yamlimport unittestfrom selenium import webdriverimport timefrom ddt import ddt, data, unpack ...

  2. spring boot Shiro JWT整合

    一个api要支持H5, PC和APP三个前端,如果使用session的话对app不是很友好,而且session有跨域攻击的问题,所以选择了JWT 1.导入依赖包 <dependency> ...

  3. Windows SMBv3 CVE-2020-0796漏洞

    今天,Microsoft不小心泄露了有关新产品的信息 蠕虫的 Microsoft服务器消息块(SMB)协议中的漏洞(CVE-2020-0796). 今天,Microsoft不小心泄露了有关安全更新的信 ...

  4. IoT设备实践丨如果你也在树莓派上部署了k3s,你也许需要这篇文章

    前 言 树莓派是一种广泛流行的开发板,随着物联网的深入发展,树莓派大有成为IoT终端设备标准之趋势.在支持客户在IoT场景中落地k3s时,k3s在树莓派上的部署问题也就出现了.本文记录了一些其中的关键 ...

  5. [C++入门篇]了解C++

    前言 我是杨某人,点击右下方"+"一键关注我.如果你喜欢我的文章,那么拒绝白嫖行为.然后..请多来做客鸭. 如果你是已经入门的大佬,请滑到下方点个推荐再走. 我个人认为,博客有两种 ...

  6. ubunto 免输入密码 登录 putty ssh-keygen

    交互式密码不安全,现在改用 ssh 证书方式,不用输入密码使用公钥证书登录. 方法1, 此方法,仅试用于,仅使用win putty 来连接方式使用,如果双方都是 linux 如 rsync 同步等时, ...

  7. python.五角星

    import turtle turtle.pensize(4)turtle.pencolor("black") turtle.fillcolor("red")t ...

  8. 最简单的???ubuntu 通过crontab定时执行一个程序

    crontab在liunx系统中下载,我默认是认为下载安装了的.. crontab貌似只能在liunx系统中存在,如果是windows系统我不知道 创建一个名为jiaoben的文件夹存储sh文件,进入 ...

  9. ggplot2(9) 数据操作

    9.1 plyr包简介 ddply {plyr}: Split data frame, apply function, and return results in a data frame. ddpl ...

  10. Linux安装Elasticsearch7.x

    Elasticsearch下载地址: https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.1.1-linux-x8 ...