Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PageReference invoicePage = Page.AP_Mensaje__c;
- invoicePage.getParameters().put('mensaje', 'This a message');
- return invoicePage;
- public AP_Prueba_Controller() {
- }
- public AP_Prueba_Controller(ApexPages.StandardController controller) {
- }
- public PageReference init() {
- PageReference invoicePage = Page.AP_Mensaje;
- invoicePage.getParameters().put('mensaje', 'Esto es un mensaje');
- invoicePage.setRedirect(true);
- return invoicePage;
- }
- <apex:page standardcontroller="AP_Accion_Comercial__c" extensions="AP_Prueba_Controller" action="{!init}">
- <!-- Begin Default Content REMOVE THIS -->
- <h1>Congratulations</h1>
- This is your new Page
- <!-- End Default Content REMOVE THIS -->
- public AP_Mensaje_Controller (ApexPages.StandardController controller) {
- }
- public AP_Mensaje_Controller (ApexPages.StandardSetController controller) {
- }
- public AP_Mensaje_Controller () {
- }
- public void init() {
- String mensaje = System.currentPageReference().getParameters().get('mensaje');
- ApexPages.addmessage(new ApexPages.message(ApexPages.severity.INFO, mensaje ));
- }
- <apex:page standardcontroller="Account" extensions="AP_Mensaje_Controller" action="{!init}" standardstylesheets="true">
- <apex:pagemessages ></apex:pagemessages>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement