Package org.springframework.binding.message

Examples of org.springframework.binding.message.MessageCriteria


   * Returns a List for all Messages with the given clientId in the current MessageContext that does translation to
   * FacesMessages.
   */
  public List<FacesMessage> getMessageList(final String clientId) {
    final FacesMessageSource source = new FacesMessageSource(clientId);
    Message[] messages = this.context.getMessageContext().getMessagesByCriteria(new MessageCriteria() {
      public boolean test(Message message) {
        return ObjectUtils.nullSafeEquals(message.getSource(), source)
            || ObjectUtils.nullSafeEquals(message.getSource(), clientId);
      }
    });
View Full Code Here


    return toErrors(messageContext.getMessagesByCriteria(ERRORS_WITHOUT_FIELD_SOURCE), ALL_ERRORS);
  }

  public List<FieldError> getFieldErrors(String field) {
    field = fixedField(field);
    MessageCriteria messageCriteria;
    if (field.endsWith("*")) {
      String prefix = field.substring(0, field.length() - 1);
      messageCriteria = new FieldPrefixErrorMessage(prefix);
    } else {
      messageCriteria = new FieldErrorMessage(field);
View Full Code Here

TOP

Related Classes of org.springframework.binding.message.MessageCriteria

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.