Dev401-023:Visualforce Pages: 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的更多相关文章

  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 III

    Dev401-024:Visualforce Pages: Visualforce Componets (Tags) Library Part IIIStatic Resources1.Static ...

  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 Controller

    Dev401-026:Visualforce Pages: Visualforce Controller   Module Objectives1.Identify the functionality ...

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

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

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

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

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

随机推荐

  1. 【Java】macOS下编译JDK8

    安装mercurial brew install mercurial 下载源码 1234 hg clone http://hg.openjdk.java.net/jdk8/jdk8 java-sour ...

  2. C++走向远洋——47(第十二周、运算符重载基础程序、阅读)

    */ * Copyright (c) 2016,烟台大学计算机与控制工程学院 * All rights reserved. * 文件名:text.cpp * 作者:常轩 * 微信公众号:Worldhe ...

  3. Web前端经典面试试题(二)

    上次由于时间有限只分享了一部分的前端面试题,所以本篇继续分享前端经典面试试题 一. 栈和队列的区别? 栈的插入和删除操作都是在一端进行的,而队列的操作却是在两端进行的. 队列先进先出,栈先进后出. 栈 ...

  4. SPA中前端路由基本原理与实现方式

    SPA 前端路由原理与实现方式 通常 SPA 中前端路由有2中实现方式,本文会简单快速总结这两种方法及其实现: 修改 url 中 Hash 利用 H5 中的 history Hash 我们都知道 ur ...

  5. http请求缓存头详解

    缓存的作用:1.减少延迟(页面打开的速度).2.降低服务器负载(先取缓存,无缓存在请求服务器,有效降低服务器的负担).3.保证稳定性(有个笑话是手机抢购时为了保证服务器的稳定性,在前端写个随机数限制百 ...

  6. 前端每日实战:1# 视频演示如何用纯 CSS 创作一个按钮文字滑动特效

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

  7. 前端小微团队的Gitlab实践

    疫情期间我感觉整个人懒散了不少,慢慢有意识要振作起来了,恢复到正常的节奏.最近团队代码库从Gerrit迁移到了Gitlab,为了让前端团队日常开发工作有条不紊,高效运转,开发历史可追溯,我也查阅和学习 ...

  8. Java避坑宝典《Java业务开发常见错误100例》上线了

    写这个专栏的缘起 之前我写过一篇博客:<朱晔的互联网架构实践心得S2E2:写业务代码最容易掉的10种坑>,引起的关注还是挺多的.后来和极客时间的编辑一拍即合决定以这个为题写一个专栏.其实所 ...

  9. Serializable详解(1):代码验证Java序列化与反序列化

    说明:本文为Serializable详解(1),最后两段内容在翻译上出现歧义(暂时未翻译),将在后续的Serializable(2)文中补充. 介绍:本文根据JDK英文文档翻译而成,本译文并非完全按照 ...

  10. Fortify Audit Workbench 笔记 SQL Injection SQL注入

    SQL Injection SQL注入 Abstract 通过不可信来源的输入构建动态 SQL 指令,攻击者就能够修改指令的含义或者执行任意 SQL 命令. Explanation SQL injec ...