Issue Type: Bug Bug
Assignee: Unassigned
Components: Documentation
Created: 27/Jul/12 12:54 PM
Description:

On page 86 of the Weld reference manual, the following example of event observer behavior is incorrect:

Event qualifier types may be combined, for example:

@Inject @Blog Event<Document> blogEvent;
...
if (document.isBlog()) blogEvent.select(new AnnotationLiteral<Updated>(){}).fire(document);

Observers must completely match the final qualified type of the event. Assume the following observers in this example:

public void afterBlogUpdate(@Observes @Updated @Blog Document document) { ... }

  public void afterDocumentUpdate(@Observes @Updated Document document) { ... }

  public void onAnyBlogEvent(@Observes @Blog Document document) { ... }

  public void onAnyDocumentEvent(@Observes Document document) { ... }}}

The only observer notified will be:

public void afterBlogUpdate(@Observes @Updated @Blog Document document) { ... }
Project: Weld
Priority: Minor Minor
Reporter: Ron Sigal
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira