Message(severity, summary, detail, id)

Creates a new instance of the ApexPages.Message class using the specified severity, summary, detail, and component ID.

Signature

public Message(ApexPages.Severity severity, String summary, String detail, String id)

Parameters

severity
Type: ApexPages.Severity
The severity of a Visualforce message.
summary
Type: String
The summary Visualforce message.
detail
Type: String
The detailed Visualforce message.
id
Type: String
The ID of the Visualforce component to associate with the message, for example, a form field with an error.