You need to sign in to do that
Don't have an account?
Mohan Selvam
How to access created page alert in apex classes -
hi
i want to create one alert message with ok button in existing visualforce page and i need to use that message
in a perticullar method of exisiting controller[apex classes]
For example
i am having visualforce page named as 'visitWarning'. In that i need to add a code to create alert message with ok button and i should call this alert in AbilityChecking() method [this method occured in my VisitAlertController Class]
Code Example :
Page
VisitWarning
<apex:page standardController="Visits__c" extensions="VisitAlertPageController" >
<apex:outputPanel layout="block" style="overflow:auto;height:100px" >
<apex:pageMessages />
</apex:outputPanel>
</apex:page>
Apex classes
public class VisitAlertPageController {
.....
......
......
public void VisitScheduledAbility(){
.........
..........
if((currentVisit.Type__c =='Hello' )
{
// I should call the alert here
}
}
}
i want to create one alert message with ok button in existing visualforce page and i need to use that message
in a perticullar method of exisiting controller[apex classes]
For example
i am having visualforce page named as 'visitWarning'. In that i need to add a code to create alert message with ok button and i should call this alert in AbilityChecking() method [this method occured in my VisitAlertController Class]
Code Example :
Page
VisitWarning
<apex:page standardController="Visits__c" extensions="VisitAlertPageController" >
<apex:outputPanel layout="block" style="overflow:auto;height:100px" >
<apex:pageMessages />
</apex:outputPanel>
</apex:page>
Apex classes
public class VisitAlertPageController {
.....
......
......
public void VisitScheduledAbility(){
.........
..........
if((currentVisit.Type__c =='Hello' )
{
// I should call the alert here
}
}
}
http://www.salesforcegeneral.com/salesforce-modal-dialog-box/
not sure if i clearly understand what you want ... but i guess it isn't a popup dialog. If you want to add a message to the page as soon as the user presses the ok button, try this:
note that you have to change your function to return a PageReference and make sure you return null at the end of your function. Moreover alter the severity of the message if needed.
Hope that is what you are looking for ..
Best,
Andreas