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 * The default is "false". 048 */ 049 @TagAttribute 050 @UIComponentTagAttribute() 051 void setGlobalOnly(String globalOnly); 052 053 /** 054 * Flag indicating whether the detail should be included 055 * The default is "false". 056 */ 057 @TagAttribute 058 @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "false") 059 void setShowDetail(String showDetail); 060 061 /** 062 * Flag indicating whether the summary should be included 063 * The default is "true". 064 */ 065 @TagAttribute 066 @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "true") 067 void setShowSummary(String showSummary); 068 069 /** 070 * Sets the mininum severity to be shown. E. g. "warn" shows only "warn", "error" and "fatal". 071 * The default is "info". 072 */ 073 @TagAttribute 074 @UIComponentTagAttribute(type = "javax.faces.application.FacesMessage.Severity", defaultValue = "info") 075 void setMinSeverity(String minSeverity); 076 077 /** 078 * Sets the maximum severity to be shown. E. g. "warn" shows only "warn" and "info". 079 * When setting this attribute you usually shoud take care, that you have a second message tag to show the 080 * higher severity levels. 081 * The default is "fatal". 082 */ 083 @TagAttribute 084 @UIComponentTagAttribute(type = "javax.faces.application.FacesMessage.Severity", defaultValue = "fatal") 085 void setMaxSeverity(String maxSeverity); 086 087 /** 088 * Sets the maximum number of messages to show. 089 * The default is 2147483647 (more or less unlimited). 090 */ 091 @TagAttribute 092 @UIComponentTagAttribute(type = "java.lang.Integer", defaultValue = "2147483647") 093 void setMaxNumber(String maxNumber); 094 095 /** 096 * Sets the order of the messages. 097 * The default "occurence". 098 */ 099 @TagAttribute 100 @UIComponentTagAttribute( 101 allowedValues = {UIMessages.OrderBy.OCCURENCE_STRING, UIMessages.OrderBy.SEVERITY_STRING}, 102 defaultValue = UIMessages.OrderBy.OCCURENCE_STRING) 103 void setOrderBy(String orderBy); 104 105 /** 106 * Should the user confirm the message explicitly. 107 * The default is "true". 108 */ 109 @TagAttribute 110 @UIComponentTagAttribute(type = "java.lang.Boolean", defaultValue = "false") 111 void setConfirmation(String confirmation); 112 113 }