salesforce apex + vf page 弹窗口
2013-08-03 18:00
323 查看
1. apex controller:
2. VF page:
3.实现效果:
public class YUT_popup { public boolean displayPopup {get; set;} public void closePopup() { displayPopup = false; } public void showPopup() { displayPopup = true; } }
2. VF page:
<apex:page controller="YUT_popup"> <apex:form > <apex:commandButton value="Show Pop up" action="{!showPopup}" rerender="popup"/> <apex:pageBlock > Lorem ipsum ..... dummy stuff to show the popup is above content </apex:pageBlock> <apex:outputPanel id="popup"> <apex:outputPanel styleClass="customPopup" layout="block" rendered="{!displayPopUp}"> Lorem ipsum <br/><br/><br/> <apex:commandButton value="Hide Pop up" action="{!closePopup}" /> </apex:outputPanel> </apex:outputPanel> </apex:form> <style type="text/css"> .customPopup{ background-color: white; border-style: solid; border-width: 2px; left: 50%; padding:10px; position: absolute; z-index: 9999; /* These are the 3 css properties you will need to tweak so the pop up displays in the center of the screen. First set the width. Then set margin-left to negative half of what the width is. You can also add the height property for a fixed size pop up.*/ width: 500px; margin-left: -250px; top:100px; } </style> </apex:page>
3.实现效果:
相关文章推荐
- salesforce apex + vf page 实现JSON
- salesforce使用Apex控制器和VF实现自定义服务器端分页项目实战(自定义分页)
- salesforce apex + vf page + Google Chart
- salesforce apex + vf page + Google Chart II
- salesforce apex + vf page 动态显示object 和 动态加载显示的列
- salesforce 零基础学习(二十六)自定义图表chart简单介绍(使用apex和VF实现)
- Salesforce apex + vf page 服务器端分页 II
- 利用 Salesforce的apex:outputText 实现VF画面的格式化
- 利用 Salesforce的apex:outputText 实现VF画面的格式化
- salesforce 零基础学习(六十五)VF页面应善于使用变量和函数(一)常用变量的使用
- Apex----salesforce开发语言---入门篇
- salesforce 零基础学习(六十六)VF页面应善于使用变量和函数(二)常用函数的使用
- Salesforce -- Apex发送电子邮件
- salesforce零基础学习(八十四)配置篇: 自定义你的home page layout
- How to solve "drivers/ner/igbvf/igbvf.h:129:15: error: duplicate member ‘page’"
- salesforce中自定义button执行js调用后台apex代码
- apex:iframe 调用其他visaulforce page
- Salesforce - Apex中设置记录类型RecordType
- Visualforce Pageにapex:paramタグの使用方法まとめ
- salesforce 零基础学习(六十六)VF页面应善于使用变量和函数(二)常用函数的使用