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 org.apache.myfaces.component.html.ext;
20
21 /**
22 *
23 * @since 1.1.7
24 * @author Leonardo Uribe (latest modification by $Author: lu4242 $)
25 * @version $Revision: 704778 $ $Date: 2008-10-14 23:27:46 -0500 (Tue, 14 Oct 2008) $
26 *
27 */
28 public interface MessageProperties
29 {
30
31 /**
32 * If present, instead of rendering the message summary,
33 * a MessageFormat with this attribute as pattern is created.
34 *
35 * The format method of this MessageFormat is called with the
36 * message summary as the first argument and the label of the
37 * associated component (if any) as the second argument.
38 *
39 * Example: "{0}:"
40 *
41 * @JSFProperty
42 */
43 public String getSummaryFormat();
44
45 public void setSummaryFormat(String summaryFormat);
46
47 /**
48 * If present, instead of rendering the message detail,
49 * a MessageFormat with this attribute as pattern is created.
50 *
51 * The format method of this MessageFormat is called with the
52 * message detail as the first argument and the label of the
53 * associated component (if any) as the second argument.
54 *
55 * Example: "The input in field {1} is wrong: {0}"
56 *
57 * @JSFProperty
58 */
59 public String getDetailFormat();
60
61 public void setDetailFormat(String detailFormat);
62
63 /**
64 * If present, all occurrences of the id of the component for
65 * which the message is rendered will be replaced by the label.
66 *
67 * Default: true.
68 *
69 * @JSFProperty
70 * defaultValue="true"
71 */
72 public boolean isReplaceIdWithLabel();
73
74 public void setReplaceIdWithLabel(boolean replaceIdWithLabel);
75
76 /**
77 * If set to true, an empty span element is rendered.
78 * Useful if there is an inputAjax field and the corresponding
79 * error message is displayed there.
80 *
81 * @JSFProperty
82 * defaultValue="false"
83 */
84 public boolean isForceSpan();
85
86 public void setForceSpan(boolean forceSpan);
87 }