<apex:page controller="DemoController" action="{!getAccountForVF}">
|
<head>
|
<style type='text/css'>
|
.customPopup{
|
background-color: white;
|
border-style: solid;
|
border-width: 2px;
|
left: 20%;
|
padding: 10px;
|
position: absolute;
|
z-index: 9999;
|
width: 500px;
|
top: 20%;
|
}
|
.customPopup .close{
|
position: absolute;
|
top: 10px;
|
right: 10px;
|
transition: all 200ms;
|
font-size: 20px;
|
text-decoration: none;
|
color: #333;
|
}
|
.customPopup .close:hover{
|
color: red;
|
}
|
</style>
|
</head>
|
<apex:form >
|
<apex:pageblock id="acctable">
|
<apex:pageMessages />
|
<apex:pageBlockButtons >
|
<apex:commandButton value="新增客户" action="{!showPopup}" reRender="popup" />
|
</apex:pageBlockButtons>
|
<apex:pageBlockTable value="{!accList}" var="account">
|
<apex:column headerValue="Name">
|
<apex:outputField value="{!account.Name}" />
|
</apex:column>
|
<apex:column headerValue="Type">
|
<apex:outputField value="{!account.Type}" />
|
</apex:column>
|
<apex:column headerValue="Phone">
|
<apex:outputField value="{!account.Phone}" />
|
</apex:column>
|
<apex:column headerValue="Fax">
|
<apex:outputField value="{!account.Fax}" />
|
</apex:column>
|
</apex:pageBlockTable>
|
</apex:pageblock>
|
<apex:outputPanel id="popup">
|
<apex:outputPanel styleClass="customPopup" layout="block" rendered="{!displayPopUp}" id="firstpopup">
|
<apex:commandLink value="X" action="{!closePopup}" styleClass="close" rerender="popup"/>
|
<apex:pageBlock >
|
<apex:pageBlockSection title="新增客户">
|
<apex:inputField value="{!newAcc.Name}" />
|
<apex:inputField value="{!newAcc.Type}" style="width: 130px" />
|
<apex:inputField value="{!newAcc.Phone}" />
|
<apex:inputField value="{!newAcc.Fax}" />
|
</apex:pageBlockSection>
|
</apex:pageBlock>
|
<apex:commandButton value="确认" action="{!addAccountForVF}" reRender="acctable,popup"/>
|
</apex:outputPanel>
|
</apex:outputPanel>
|
<!-- <apex:selectList value="{!countries}" multiselect="true">
|
<apex:selectOptions value="{!items}"/>
|
<apex:commandButton value="Test" action="{!test}" rerender="out" status="status"/>
|
</apex:selectList><p/>
|
<apex:outputPanel id="out">
|
<apex:actionstatus id="status" startText="testing...">
|
<apex:facet name="stop">
|
<apex:outputPanel >
|
<p>You have selected:</p>
|
<apex:dataList value="{!countries}" var="c">{!c}</apex:dataList>
|
</apex:outputPanel>
|
</apex:facet>
|
</apex:actionstatus>
|
</apex:outputPanel> -->
|
</apex:form>
|
</apex:page>
|