You need to sign in to do that
Don't have an account?
Shrey Tyagi
<apex:actionstatus> callout fron <apex:commandbutton> not working .Please help!!!
Hi Everyone ,
I have 2 visualforce pages given below . One works , other does not . I am trying to grey out the page upon click of a button , so I am trying to call out an action status from command button . In this page given below it works perfectly well:
<apex:page standardController="Account">
<style>
/* This is for the full screen DIV */
.popupBackground {
/* Background color */
background-color:black;
opacity: 0.20;
filter: alpha(opacity = 20);
/* Dimensions */
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 998;
position: absolute;
/* Mouse */
cursor:wait;
}
/* This is for the message DIV */
.PopupPanel {
/* Background color */
border: solid 2px blue;
background-color: white;
/* Dimensions */
left: 50%;
width: 200px;
margin-left: -100px;
top: 50%;
height: 50px;
margin-top: -25px;
z-index: 999;
position: fixed;
/* Mouse */
cursor:pointer;
}
</style>
<apex:actionStatus id="statusSaveTrip" stopText="">
<apex:facet name="start">
<div>
<div class="popupBackground" />
<div class="PopupPanel">
<table border="0" width="100%" height="100%">
<tr>
<td align="center"><b>Please Wait</b></td>
</tr>
<tr>
<td align="center"><img src="{!$Resource.ProgressBar}"/></td>
</tr>
</table>
</div>
</div>
</apex:facet>
</apex:actionStatus>
<apex:form id="myForm">
<apex:pageMessages />
<apex:pageBlock >
<apex:pageBlockButtons location="Top">
<apex:commandButton value="Click Me" action="{!quicksave}" rerender="myForm" status="statusSaveTrip" />
</apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:inputField value="{!Account.Name}" />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
When I try to imitate the same piece of code in this page it does not work , can I please know why this is the case? What am I doing wrong here:
<apex:page controller="ProposalSearchControllerModified" sidebar="false" readonly="True">
<style>
/* This is for the full screen DIV */
.popupBackground {
/* Background color */
background-color:black;
opacity: 0.20;
filter: alpha(opacity = 20);
/* Dimensions */
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 998;
position: absolute;
/* Mouse */
cursor:wait;
}
/* This is for the message DIV */
.PopupPanel {
/* Background color */
border: solid 2px blue;
background-color: white;
/* Dimensions */
left: 50%;
width: 200px;
margin-left: -100px;
top: 50%;
height: 50px;
margin-top: -25px;
z-index: 999;
position: fixed;
/* Mouse */
cursor:pointer;
}
</style>
<apex:actionStatus id="statusSaveTrip" stopText="">
<apex:facet name="start">
<div>
<div class="popupBackground" />
<div class="PopupPanel">
<table border="0" width="100%" height="100%">
<tr>
<td align="center"><b>Please Wait</b></td>
</tr>
<tr>
<td align="center"><img src="{!$Resource.ProgressBar}"/></td>
</tr>
</table>
</div>
</div>
</apex:facet>
</apex:actionStatus>
<apex:form >
<apex:pageMessages id="errors"/>
<apex:pageBlock title="Search Proposal Records" mode="edit" id="OuterPageBlock">
<table width="100%" border="0">
<tr>
<td width="200" valign="top">
<apex:pageBlock title="Search Parameters" mode="edit" id="criteria">
<script type="text/javascript">
function stopRKey(evt) {
var evt = (evt) ? evt : ((event) ? event : null);
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
}
document.onkeypress = stopRKey;
function doSearch() {
searchServer(
document.getElementById("Name").value,
document.getElementById("OpportunityID").value
);
}
</script>
<apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors,size,size1,size2">
<apex:param name="Name" value="" />
<apex:param name="OpportunityID" value="" />
</apex:actionFunction>
<table cellpadding="2" cellspacing="2">
<tr>
<td style="font-weight:bold;">Opportunity ID<br/>
<input type="text" id="OpportunityID" />
</td>
</tr>
<tr>
<td><br/>
<apex:commandButton onclick="doSearch();return false;" value="Search Proposals”/ status=“statusSaveTrip”>
<apex:commandButton value="Reset Filters" action="{!reset}"/>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</apex:pageBlock>
</td>
<td valign="top">
<table style="width: 100%;">
<td>
<apex:pageBlock mode="edit" id="results">
<div style="overflow: auto; height: 300px;">
<apex:pageBlockTable value="{!Opportunities}" var="opp">
<apex:column >
<apex:facet name="header">
<apex:commandLink value="Opportunity Name" action="{!toggleSort}" rerender="results,debug">
<apex:param name="sortField" value="Name" assignTo="{!sortField}"/>
</apex:commandLink>
</apex:facet>
<apex:commandlink value="{!opp.Name}" rerender="RecordDetailSection" action="{!ClearOrder}">
<apex:param name="DetailRecordId" value="{!opp.Id}" assignTo="{!DetailRecordId}"/>
</apex:commandlink>
</apex:column>
<apex:column >
<apex:facet name="header">
<apex:commandLink value="Opportunity ID" action="{!toggleSort}" rerender="results,debug">
<apex:param name="sortField" value="OpportunityID" assignTo="{!sortField}"/>
</apex:commandLink>
</apex:facet>
<apex:outputField value="{!opp.Opportunity_ID__c}"/>
</apex:column>
</apex:pageBlockTable>
</div>
</apex:pageBlock>
</td>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
</apex:pageBlock>
</apex:form>
I have 2 visualforce pages given below . One works , other does not . I am trying to grey out the page upon click of a button , so I am trying to call out an action status from command button . In this page given below it works perfectly well:
<apex:page standardController="Account">
<style>
/* This is for the full screen DIV */
.popupBackground {
/* Background color */
background-color:black;
opacity: 0.20;
filter: alpha(opacity = 20);
/* Dimensions */
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 998;
position: absolute;
/* Mouse */
cursor:wait;
}
/* This is for the message DIV */
.PopupPanel {
/* Background color */
border: solid 2px blue;
background-color: white;
/* Dimensions */
left: 50%;
width: 200px;
margin-left: -100px;
top: 50%;
height: 50px;
margin-top: -25px;
z-index: 999;
position: fixed;
/* Mouse */
cursor:pointer;
}
</style>
<apex:actionStatus id="statusSaveTrip" stopText="">
<apex:facet name="start">
<div>
<div class="popupBackground" />
<div class="PopupPanel">
<table border="0" width="100%" height="100%">
<tr>
<td align="center"><b>Please Wait</b></td>
</tr>
<tr>
<td align="center"><img src="{!$Resource.ProgressBar}"/></td>
</tr>
</table>
</div>
</div>
</apex:facet>
</apex:actionStatus>
<apex:form id="myForm">
<apex:pageMessages />
<apex:pageBlock >
<apex:pageBlockButtons location="Top">
<apex:commandButton value="Click Me" action="{!quicksave}" rerender="myForm" status="statusSaveTrip" />
</apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:inputField value="{!Account.Name}" />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
When I try to imitate the same piece of code in this page it does not work , can I please know why this is the case? What am I doing wrong here:
<apex:page controller="ProposalSearchControllerModified" sidebar="false" readonly="True">
<style>
/* This is for the full screen DIV */
.popupBackground {
/* Background color */
background-color:black;
opacity: 0.20;
filter: alpha(opacity = 20);
/* Dimensions */
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 998;
position: absolute;
/* Mouse */
cursor:wait;
}
/* This is for the message DIV */
.PopupPanel {
/* Background color */
border: solid 2px blue;
background-color: white;
/* Dimensions */
left: 50%;
width: 200px;
margin-left: -100px;
top: 50%;
height: 50px;
margin-top: -25px;
z-index: 999;
position: fixed;
/* Mouse */
cursor:pointer;
}
</style>
<apex:actionStatus id="statusSaveTrip" stopText="">
<apex:facet name="start">
<div>
<div class="popupBackground" />
<div class="PopupPanel">
<table border="0" width="100%" height="100%">
<tr>
<td align="center"><b>Please Wait</b></td>
</tr>
<tr>
<td align="center"><img src="{!$Resource.ProgressBar}"/></td>
</tr>
</table>
</div>
</div>
</apex:facet>
</apex:actionStatus>
<apex:form >
<apex:pageMessages id="errors"/>
<apex:pageBlock title="Search Proposal Records" mode="edit" id="OuterPageBlock">
<table width="100%" border="0">
<tr>
<td width="200" valign="top">
<apex:pageBlock title="Search Parameters" mode="edit" id="criteria">
<script type="text/javascript">
function stopRKey(evt) {
var evt = (evt) ? evt : ((event) ? event : null);
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
}
document.onkeypress = stopRKey;
function doSearch() {
searchServer(
document.getElementById("Name").value,
document.getElementById("OpportunityID").value
);
}
</script>
<apex:actionFunction name="searchServer" action="{!runSearch}" rerender="results,debug,errors,size,size1,size2">
<apex:param name="Name" value="" />
<apex:param name="OpportunityID" value="" />
</apex:actionFunction>
<table cellpadding="2" cellspacing="2">
<tr>
<td style="font-weight:bold;">Opportunity ID<br/>
<input type="text" id="OpportunityID" />
</td>
</tr>
<tr>
<td><br/>
<apex:commandButton onclick="doSearch();return false;" value="Search Proposals”/ status=“statusSaveTrip”>
<apex:commandButton value="Reset Filters" action="{!reset}"/>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</apex:pageBlock>
</td>
<td valign="top">
<table style="width: 100%;">
<td>
<apex:pageBlock mode="edit" id="results">
<div style="overflow: auto; height: 300px;">
<apex:pageBlockTable value="{!Opportunities}" var="opp">
<apex:column >
<apex:facet name="header">
<apex:commandLink value="Opportunity Name" action="{!toggleSort}" rerender="results,debug">
<apex:param name="sortField" value="Name" assignTo="{!sortField}"/>
</apex:commandLink>
</apex:facet>
<apex:commandlink value="{!opp.Name}" rerender="RecordDetailSection" action="{!ClearOrder}">
<apex:param name="DetailRecordId" value="{!opp.Id}" assignTo="{!DetailRecordId}"/>
</apex:commandlink>
</apex:column>
<apex:column >
<apex:facet name="header">
<apex:commandLink value="Opportunity ID" action="{!toggleSort}" rerender="results,debug">
<apex:param name="sortField" value="OpportunityID" assignTo="{!sortField}"/>
</apex:commandLink>
</apex:facet>
<apex:outputField value="{!opp.Opportunity_ID__c}"/>
</apex:column>
</apex:pageBlockTable>
</div>
</apex:pageBlock>
</td>
<tr>
<td>
</td>
</tr>
</table>
</td>
</tr>
</table>
</apex:pageBlock>
</apex:form>
<apex:actionStatus id="Status" stopText="">
<apex:facet name="start">
<div>
<div class="popupBackground" />
<div class="PopupPanel">
<table border="0" width="100%" height="100%">
<tr>
<td align="center"><b>Please Wait</b></td>
</tr>
<tr>
<td align="center"><img src="/img/loading.gif" /></td>
</tr>
</table>
</div>
</div>
</apex:facet>
</apex:actionStatus>
<apex:commandButton rerender="OuterPageBlock" onclick="doSearch();return false;" value="Search Proposals”/ status=“statusSaveTrip”>