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. cssy元素居中的方法有哪些?

    css的元素居中 各位小伙伴们在努力写网页的时候有没有遇到过这样的一个问题呢? 在写的时候发现他不居中,可是要分分钟逼死强迫症的啊! 别急,我来啦 哈哈哈 今天就带来三种css的元素居中的方法 第一种 ...

  2. ado.net DataSet

    一.概念 DataSet是ADO.NET的中心概念.可以把DataSet当成内存中的数据库,DataSet是不依赖于数据库的独立数据集合.所谓独立,就是说,即使断开数据链路,或者关闭数据库,DataS ...

  3. mysql数据库笔记0

    mysql数据库笔记0 一次性添加多行数据 例如: INSERT INTO students (class_id, name, gender, score) VALUES (1, '大宝', 'M', ...

  4. HTML与CSS 开发常用语义化命名

    一.布局❤️ header 头部/页眉:index 首页/索引:logo 标志:nav/sub_nav 导航/子导航:banner 横幅广告:main/content 主体/内容:container/ ...

  5. 前端每日实战:34# 视频演示如何用纯 CSS 创作在文本前后穿梭的边框

    效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/qYepNv 可交互视频教程 此视频 ...

  6. 零基础JavaScript编码(三)总结

    任务目的 在上一任务基础上继续JavaScript的体验 接触一下JavaScript中的高级选择器 学习JavaScript中的数组对象遍历.读写.排序等操作 学习简单的字符串处理操作 任务描述 参 ...

  7. vue中v-if和v-show的区别

    v-if.v-show顾名思义就是用来判断视图层展示效果的.  v-if 指令用于条件性地渲染一块内容.这块内容只会在指令的表达式返回真值的时候被渲染. v-show 指的是单纯的切换元素的样式dis ...

  8. postgreSQL外键引用查询 查询外键被那些表占用

    根据一个表名,查询所有外键引用它的表,以及那些外键的列名key_column_usage(系统列信息表),pg_constraint(系统所有约束表) SELECT x.table_name, x.c ...

  9. opt目录

    在linux环境测试时,会部署到/opt目录下,这是为何呢? 下面来详解Linux的/opt目录: /opt:用户级的程序目录 这里主要存放那些可选的程序. 比如,你想部署firefox测试版,那就装 ...

  10. CouchDB的简单使用

    一.安装CouchDB 到官网下载CouchDB,在windows下安装CouchDB较为简单,略过. 安装完后,确认CouchDB在运行,然后在浏览器访问http://127.0.0.1:5984/ ...