Error messageContext.add

2

As the manual describes to insert a message we use the following command

messageContext.add(InfoMessages.BOOKMARK_INSERT_OK, bookmark.getDescription());

But the add method should only receive a "String message and Object ... params" this generates an error because we are passing a Message type like what would be the correct procedure? I should report this:

messageContext.add(InfoMessages.BOOKMARK_INSERT_OK.getText(),
  bookmark.getDescription());

and also:

messageContext.add(InfoMessages.BOOKMARK_INSERT_OK.getText(),    
  InfoMessages.BOOKMARK_INSERT_OK.getSeverity(), bookmark.getDescription());

Should not there be a method that receives the Message object?

    
asked by anonymous 20.05.2015 / 15:45

1 answer

0

Gustavo, if you take a look here > in the reference documentation you will see that it is rather possible to pass a Message object to the add method of MessageContext . There is the following interface for this method: void add(Message message, Object... params) , so it can receive 0 or more parameters in addition to the message.

    
20.05.2015 / 22:30