zoukankan      html  css  js  c++  java
  • 028_Visualforce Components 案例整理

    1.主要介绍outputPanel 、rendered  

    outputPanel :组合在一起的一组内容,使用HTML <span>标签,<table>,<div>标签或两者都呈现。 使用<apex:outputPanel>将组件组合在一起以进行AJAX刷新。

    该组件使用“html-”前缀支持HTML传递属性。 传递属性附加到生成的容器标签<div>或<span>,具体取决于layout属性的值。

    <apex:outputPanel id="acc_" rendered="{!!inquiry.isNewc}">
     <table>
          <span class="btn_" id="select_" onclick="beforeNew();">新增</span>
     </table>
    </apex:outputPanel>

    代码解读:在这个输出面板中,当{!!inquiry.isNewc}  为True时,才会呈现(显示)以下table。点击新增调用JS方法。

    <apex:page standardController="Account" recordSetvar="accounts">
    <apex:pageBlock title="Viewing Accounts">
    <apex:form id="theForm">
    <apex:panelGrid columns="2">
    <apex:outputLabel value="View:"/>
    <apex:selectList value="{!filterId}" size="1">
    <apex:actionSupport event="onchange" rerender="list"/>
    <apex:selectOptions value="{!listviewoptions}"/>
    </apex:selectList>
    </apex:panelGrid>
    <apex:pageBlockSection >
    <apex:dataList var="a" value="{!accounts}" id="list">
    {!a.name}
    </apex:dataList>
    </apex:pageBlockSection>
    </apex:form>

    这部分代码是直接Copy PDF中的内容,认为selectList 中的写法非常好,值得大家学习以下,是直接获取当前Object中View数据;并且能通过Event直接显示(重新呈现 Rerender)对应的view中的List;

    <apex:outputtext value="{0,number,#,##0.000}"> 如果是小数的话,相当于格式化

    集合:< apex:selectCheckBoxes >,< apex:selectRadio >, or< apex:selectList >.< apex:selectOptions >为子集

    此刻,静下心来学习
  • 相关阅读:
    linux & xp 双系统 重装的问题
    判断推理类试题的复言命题考点与题型总结
    Oracle、MySQL、SQL Server数据库的数据类型的差异
    java环境变量设置和问题及解决方法
    如何正确卸载MySQL,主要是删除注册表中的垃圾信息
    J2EE经典面试题及答案
    正则表达式
    囚犯的两难处境
    MySQL 数值数据类型
    linux学习之SHELL脚本
  • 原文地址:https://www.cnblogs.com/bandariFang/p/7018929.html
Copyright © 2011-2022 走看看