001 package org.apache.myfaces.tobago.taglib.component; 002 003 /* 004 * Licensed to the Apache Software Foundation (ASF) under one or more 005 * contributor license agreements. See the NOTICE file distributed with 006 * this work for additional information regarding copyright ownership. 007 * The ASF licenses this file to You under the Apache License, Version 2.0 008 * (the "License"); you may not use this file except in compliance with 009 * the License. You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 */ 019 020 import org.apache.myfaces.tobago.apt.annotation.BodyContent; 021 import org.apache.myfaces.tobago.apt.annotation.Tag; 022 import org.apache.myfaces.tobago.apt.annotation.TagAttribute; 023 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag; 024 import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute; 025 import org.apache.myfaces.tobago.component.UIMessages; 026 import org.apache.myfaces.tobago.taglib.decl.HasFor; 027 import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered; 028 029 /* 030 * Date: 02.04.2006 031 * Time: 15:53:45 032 */ 033 034 /** 035 * Renders error/validation messages. 036 */ 037 @Tag(name = "messages", bodyContent = BodyContent.EMPTY) 038 @UIComponentTag( 039 uiComponent = "org.apache.myfaces.tobago.component.UIMessages", 040 rendererType = "Messages") 041 042 public interface MessagesTagDeclaration extends TobagoTagDeclaration, HasIdBindingAndRendered, HasFor { 043 044 /** 045 * Flag indicating that only messages that are not associated to any 046 * particular UIComponent should be displayed. That are messages without clientId. 047 */ 048 @TagAttribute 049 @UIComponentTagAttribute(defaultValue = "false") 050 void setGlobalOnly(String globalOnly); 051 052 /** 053 * Flag indicating whether the detail should be included 054 */ 055 @TagAttribute 056 @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "false") 057 void setShowDetail(String showDetail); 058 059 /** 060 * Flag indicating whether the summary should be included 061 */ 062 @TagAttribute 063 @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "true") 064 void setShowSummary(String showSummary); 065 066 /** 067 * Sets the mininum severity to be shown. E. g. "warn" shows only "warn", "error" and "fatal". 068 */ 069 @TagAttribute 070 @UIComponentTagAttribute(type = "javax.faces.application.FacesMessage.Severity", defaultValue = "info") 071 void setMinSeverity(String minSeverity); 072 073 /** 074 * Sets the maximum severity to be shown. E. g. "warn" shows only "warn" and "info". 075 * When setting this attribute you usually shoud take care, that you have a second message tag to show the 076 * higher severity levels. 077 */ 078 @TagAttribute 079 @UIComponentTagAttribute(type = "javax.faces.application.FacesMessage.Severity", defaultValue = "fatal") 080 void setMaxSeverity(String maxSeverity); 081 082 /** 083 * Sets the maximum number of messages to show. 084 */ 085 @TagAttribute 086 @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "2147483647") 087 void setMaxNumber(String maxNumber); 088 089 /** 090 * Sets the order of the messages. 091 */ 092 @TagAttribute 093 @UIComponentTagAttribute( 094 allowedValues = { 095 UIMessages.OrderBy.OCCURRENCE_STRING, 096 UIMessages.OrderBy.SEVERITY_STRING, 097 UIMessages.OrderBy.OCCURENCE_STRING}, 098 defaultValue = UIMessages.OrderBy.OCCURRENCE_STRING) 099 void setOrderBy(String orderBy); 100 101 /** 102 * Should the user confirm the message explicitly. 103 */ 104 @TagAttribute 105 @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "false") 106 void setConfirmation(String confirmation); 107 108 }