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 >为子集

    此刻,静下心来学习
  • 相关阅读:
    控制器View的加载过程
    iOS程序的完整启动过程(有storyboard)
    SDWebImage的使用
    iOS开发中自定义字体的方法
    3.Ubuntu 16.04.6 离线安装 docker
    2.Ubuntu 16.4.6 Server IP配置及shell访问设置
    1.VMware安装Ubuntu 16.4.6 Server
    大话设计模式读书笔记系列-5.工厂方法
    Solr4.10.4 加中文分词
    windows+tomcat8.5+solr环境配置教程
  • 原文地址:https://www.cnblogs.com/bandariFang/p/7018929.html
Copyright © 2011-2022 走看看