anchor.diff:  
   [source, java]
   ----
  -    private void onMessageClicked(MessageComponent source, Message message) {
  -        if (!message.isRead()) {
  -            message.setRead(true);
  -            messageFacade.save(message);
  -            source.setIndicator(true, message.getFlag());
  -        }
  -    }
  +private void onMessageClicked(MessageComponent source, Message message) {
  +    if (!message.isRead()) {
  +        message.setRead(true);
  +        messageFacade.save(message);
  +        source.setIndicator(true, message.getFlag());
  +    }
  +}
   ----
   
   As an added bonus the message folder badge on the left side menu should update right away so fire a CDI event called 
  
positive.code: ----
  
  === Entity
  In this simple example you only need a single JPA entity, which represents the listed message. An abstract entity here is a base class containing version and id fields.
  
  [source, java]
  ----
  
negative.code: 
  [source, java]
  ----
  public void setIndicator(boolean read, Flag flag) {
      MyTheme.MESSAGE_STYLES.forEach(indicatorButton::removeStyleName);
      indicatorButton.setIcon(null);
      if (flag == Flag.FLAG_STAR) {
          indicatorButton.setIcon(FontAwesome.STAR);
          if (!read) {
              indicatorButton.addStyleName(MyTheme.INDICATOR_STAR_RED);
          }
      } else if (!read) {
          indicatorButton.setIcon(FontAwesome.CIRCLE);
          indicatorButton.addStyleName(MyTheme.INDICATOR_CIRCLE);
      }
  }
  ----
  
  - Call setIndicator in MessageComponent constructor +
  `setIndicator(message.isRead(), message.getFlag())`;
  
  === Marking messages as read
  .Let’s add a support for marking messages as read. This requires you to:
  