View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package javax.faces.component;
20  
21  import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
22  import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty;
23  
24  /**
25   *
26   * UIMessage is the base component class for components
27   * that display a multiple messages on behalf of a component.
28   */
29  @JSFComponent
30  (clazz = "javax.faces.component.UIMessages",template=true,
31  defaultRendererType = "javax.faces.Messages"
32  )
33  abstract class _UIMessages extends UIComponentBase
34  {
35  
36    static public final String COMPONENT_FAMILY =
37      "javax.faces.Messages";
38    static public final String COMPONENT_TYPE =
39      "javax.faces.Messages";
40  
41    /**
42     * Specifies whether only messages (FacesMessage objects) not associated with a
43     * specific component should be displayed, ie whether messages should be ignored
44     * if they are attached to a particular component. Defaults to false.
45     *
46     * @return  the new globalOnly value
47     */
48    @JSFProperty
49    (defaultValue = "false")
50    public abstract boolean isGlobalOnly();
51  
52    /**
53     * Specifies whether the detailed information from the message should be shown. 
54     * Default to false.
55     *
56     * @return  the new showDetail value
57     */
58    @JSFProperty
59    (defaultValue = "false")
60    public abstract boolean isShowDetail();
61  
62    /**
63     * Specifies whether the summary information from the message should be shown.
64     * Defaults to true.
65     *
66     * @return  the new showSummary value
67     */
68    @JSFProperty
69    (defaultValue = "true")
70    public abstract boolean isShowSummary();
71    
72    /**
73     * Indicate this component should render already handled messages.
74     * Default value is true
75     * 
76     * @since 2.0
77     * @return
78     */
79    @JSFProperty
80    (defaultValue = "true", tagExcluded=true)  
81    public abstract boolean isRedisplay();
82  
83    /**
84     * The ID of the component whose attached FacesMessage object (if present) 
85     * should be diplayed by this component. It takes precedence over globalOnly.
86     *
87     * @since 2.0
88     * @return  the new for value
89     */
90    @JSFProperty
91    public abstract String getFor();  
92  }