Building Applications with Force.com and VisualForce (DEV401) (二二):Visualforce Componets (Tags) Library Part II
Apex:pageBlockTable
1.A list of data displayed as a table within either an <apex:pageBlock> or <apex:pageBlockSection> component, similar to a related list or list view in a standard Salesforce page. Like an <apex:dataTable>, an <apex:pageBlockTable> is defined by iterating over a set of data, displaying information about one item of data per row. The set of data can contain up to 1,000 items.
2.Example
<!-- For this example to render properly, you must associate the Visualforce page
with a valid account record in the URL.
For example, if 001D000000IRt53 is the account ID, the resulting URL should be:
https://Salesforce_instance/apex/myPage?id=001D000000IRt53
See the Visualforce Developer's Guide Quick Start Tutorial for more information. -->
<!-- Page: -->
<apex:page standardController="Account">
<apex:pageBlock title="My Content">
<apex:pageBlockTable value="{!account.Contacts}" var="item">
<apex:column value="{!item.name}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Apex:dataTable
1.An HTML table that is defined by iterating over a set of data, displaying information about one item of data per row.
2.The body of the <apex:dataTable> contains one or more column components that specify what information should be displayed for each item of data. The data set can include up to 1,000 items.
Apex:column
1.A single column in a table. An <apex:column> component must always be a child of an <apex:dataTable> or
<apex:pageBlockTable> component.
2.Example:
<!-- For this example to render properly, you must associate the Visualforce page
with a valid account record in the URL.
For example, if 001D000000IRt53 is the account ID, the resulting URL should be:
https://Salesforce_instance/apex/myPage?id=001D000000IRt53
See the Visualforce Developer's Guide Quick Start Tutorial for more information. -->
<apex:page standardController="Account">
<apex:pageBlock title="My Content">
<apex:pageBlockTable value="{!account.Contacts}" var="item">
<apex:column value="{!item.name}"/>
<apex:column value="{!item.phone}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Apex:Repeat
1.An iteration component that allows you to output the contents of a collection according to a structure that you specify. The collection can include up to 1,000 items.
2.This component cannot be used as a direct child of the following components:
- <apex:dataTable>
-<apex:pageBlockTable>
- <apex:panelBar>
- <apex:selectCheckboxes>
- <apex:selectList>
- <apex:selectRadio>
- <apex:tabPanel>
Exercise 3-3:Displaying Data in Tables in an Inline Page
1.Goal(s):
- create two different types of tables of data within an inline page.
2.Scenario:
- Universal Containers wants to display candidate and job application information on the position page. There's no reason to recreate the entire Position page,however,as they simply want to add a new section.
3.Tasks:
- Create the new visualforce page.
- Add the page to an inline section of the page layout.
Output Components
1.These tags all deal with displaying information without allowing the user to change any data.
2.many output components have parallel input components, such as iputField and outputField.
Apex:outputText
1.Displays text on a Visualforce page. You can customize the appearance of <apex:outputText> using CSS styles, in which case the generated text is wrapped in an HTML <span> tag. You can also escape the rendered text if it contains sensitive HTML and XML characters. This component does take localization into account.
2.Use with nested param tags to format the text values, where {n} corresponds to the n-th nested param tag. The value attribute supports the same syntax as the MessageFormat class in Java. See the MessageFormat class JavaDocs for more information.
3.Example:
<apex:page>
<apex:outputText style="font-style:italic" value="This is {0} text with {1}.">
<apex:param value="my"/>
<apex:param value="arguments"/>
</apex:outputText>
</apex:page>
Apex:outputLabel
1.A label for an input or output field. Use this component to provide a label for a controller method that does not correspond to a field on a Salesforce object.
2.Example
<apex:outputLabel value="Checkbox" for="theCheckbox"/>
<apex:inputCheckbox value="{!inputValue}" id="theCheckbox"/>
Apex:outputLink
1.A link to a URL. This component is rendered in HTML as an anchor tag with an href attribute. Like its HTML equivalent, the body of an <apex:outputLink> is the text or image that displays as the link. To add query string parameters to a link, use nested <apex:param> components.
See also: <apex:commandLink>
2.Example
<apex:outputLink value="https://www.salesforce.com" id="theLink">www.salesforce.com</apex:outputLink>
Apex:outputPanel
1.A set of content that is grouped together, rendered with an HTML <span> tag, <div> tag, or neither. Use an
<apex:outputPanel> to group components together for AJAX refreshes.
2.Span Example
<!-- Spans do not add any additional formatting to the body of the outputPanel. -->
<apex:outputPanel id="thePanel">My span</apex:outputPanel>
Apex:outputText
1.Displays text on a Visualforce page. You can customize the appearance of <apex:outputText> using CSS styles, in which case the generated text is wrapped in an HTML <span> tag. You can also escape the rendered text if it contains sensitive HTML and XML characters. This component does take localization into account.
2.Use with nested param tags to format the text values, where {n} corresponds to the n-th nested param tag. The value attribute supports the same syntax as the MessageFormat class in Java. See the MessageFormat class JavaDocs for more information.
3.Basic formatting example
<apex:page>
<apex:outputText style="font-style:italic" value="This is {0} text with {1}.">
<apex:param value="my"/>
<apex:param value="arguments"/>
</apex:outputText>
</apex:page>
Apex:message
A message for a specific component, such as a warning or error. If an <apex:message> or <apex:messages> component is not included in a page, most warning and error messages are only shown in the debug log.
Apex:form
1.A section of a Visualforce page that allows users to enter input and then submit it with an <apex:commandButton> or <apex:commandLink>. The body of the form determines the data that is displayed and the way it is processed.
2.It's a best practice to verify that pages and custom components use at most one <apex:form> tag.
As of API version 18.0, this tag can't be a child component of <apex:repeat>.
Apex:inputField
1.An HTML input element for a value that corresponds to a field on a Salesforce object. The <apex:inputField> component respects the attributes of the associated field, including whether the field is required or unique, and the user interface widget to display to get input from the user.
2.For example, if the specified <apex:inputField> component is a date field, a calendar input widget is displayed. When used in an <apex:pageBlockSection>, <apex:inputField> tags always display with their corresponding output label.
Apex:selectCheckboxes
A set of related checkbox input elements, displayed in a table.
Apex:selectList
A list of options that allows users to select only one value or multiple values at a time, depending on the value of its multiselect attribute.
Apex:selectRadio
A set of related radio button input elements, displayed in a table. Unlike checkboxes, only one radio button can ever be selected at a time.
Apex:inputFile
A component that creates an input field to upload a file.
Note: The maximum file size that can be uploaded via Visualforce is 10 MB.
Apex:commandButton
1.A button that is rendered as an HTML input element with the type attribute set to submit, reset, or image, depending on the <apex:commandButton> tag's specified values. The button executes an action defined by a controller, and then either refreshes the current page, or navigates to a different page based on the PageReference variable that is returned by the action.
2.An <apex:commandButton> component must always be a child of an <apex:form> component.
See also: <apex:commandLink>
<apex:commandButton action="{!save}" value="Save" id="theButton"/>
Apex:commandLink
A link that executes an action defined by a controller, and then either refreshes the current page, or navigates to a different page based on the PageReference variable that is returned by the action. An <apex:commandLink> component must always be a child of an <apex:form> component.
To add request parameters to an <apex:commandLink>, use nested <apex:param> components.
See also: <apex:commandButton>, <apex:outputLink>.
Example
<apex:commandLink action="{!save}" value="Save" id="theCommandLink"/>
Building Applications with Force.com and VisualForce (DEV401) (二二):Visualforce Componets (Tags) Library Part II的更多相关文章
- 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 III
Dev401-024:Visualforce Pages: Visualforce Componets (Tags) Library Part IIIStatic Resources1.Static ...
- 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 Controller
Dev401-026:Visualforce Pages: Visualforce Controller Module Objectives1.Identify the functionality ...
- Building Applications with Force.com and VisualForce (DEV401) (二四):JavaScript in Visualforce
Dev401-025:Visualforce Pages: JavaScript in Visualforce Module Objectives1.Describe the use of AJAX ...
- 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. ...
随机推荐
- ansible使用指北(二)
前言在上一篇文章里我们了解了ansible的常用模块,今天我们来了解下ansible-playbook,ansbile-playbook是一系统ansible命令的集合,其利用yaml 语言编写,an ...
- Go基础学习(二)
数组[array] 数组定义[定义后长度不可变] 12 symbol := [...]string{USD: "$", EUR: "€", GBP: " ...
- webpack插件
插件 plugins:[ new ExtractTextPlugin.extrct({ }) //创建html new HtmlWebpackPlugin({ title:"first pa ...
- FPGA小白学习之路(2)error:buffers of the same direction cannot be placed in series
锁相环PLL默认输入前端有个IBUFG单元,在输出端有个BUFG单元,而两个BUFG(IBUFG)不能相连,所以会报这样的错: ERROR:NgdBuild:770 - IBUFG 'u_pll0/c ...
- python 读取 execl 文件 之 xlrd 模块
1. 安装 xlrd模块 pip install xlrd 2. 读取文件内容 #!/usr/bin/env python3 import xlrd name = r"E:\excel\yo ...
- Elasticsearch系列---深入全文搜索
概要 本篇介绍怎样在全文字段中搜索到最相关的文档,包含手动控制搜索的精准度,搜索条件权重控制. 手动控制搜索的精准度 搜索的两个重要维度:相关性(Relevance)和分析(Analysis). 相关 ...
- 前端笔记--css样式笔记
一.浮动 定位布局 1.浮动布局 left 元素向左浮动 right 元素向右浮动 例如:设置2个按钮,要使得按钮在同一行位置摆放,可以使用浮动,令按钮浮动到右边.注意,先设置float的按钮,例如: ...
- python中if __name__ == '__main__'是什么?
__name__和__main__认识 作用:一般用于测试程序的功能,if __name__ == '__main__':下面的代码会被执行,但当前.py文件被当做模块导入的时候,main下面的代码就 ...
- PAT-字符串处理-B1006 换个格式输出整数 (15分)
题目描述: 让我们用字母 B 来表示“百”.字母 S 表示“十”,用 12...n 来表示不为零的个位数字 n(<10),换个格式来输出任一个不超过 3 位的正整数.例如 234 应该被输出为 ...
- 超详细的网络抓包神器 tcpdump 使用指南
原文链接:Tcpdump 示例教程 本文主要内容翻译自<Tcpdump Examples>. tcpdump 是一款强大的网络抓包工具,它使用 libpcap 库来抓取网络数据包,这个库在 ...