+ Start a Discussion
Madhura BMadhura B 

Help displaying page messages on VF pages

I have attempted to dispaly an error message on my visualforce page when a user tries to log into partner portal with wrong credentials by making use of
<apex:pageMessages id="error"/>  tag.

 

How can i edit the error message?

Any idea?

Pradeep_NavatarPradeep_Navatar

try

{

                //code

}

catch(Exception e)

{

                //Use this for Standard Error Message on VF Page

                ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, e.getMessage());

                ApexPages.addMessage(myMsg);

 

                //Use this for Custom Error Message on VF Page

                ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL, 'Your Custom Error Msg');

                ApexPages.addMessage(myMsg);

}

UrsfriendlyUrsfriendly

i have worked with this,i am not getting custom message on VF page Can u Help Me