// Copyright 2006, 2007, 2008, 2009, 2010 The Apache Software Foundation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
A Label will render its body, if it has one. However, in most cases it will not have a body, and will render its field's label as it's body. Remember, however, that it is the field label that will be used in any error messages. The Label component allows for client- and server-side validation error decorations.
linked to this label (it is named this way because it results in the for attribute of the label element).
@Parameter(name = "for", required = true, allowNull = false, defaultPrefix = BindingConstants.COMPONENT)
// Since we don't know if the field has rendered yet, we need to defer writing the for and id
// attributes until we know the field has rendered (and set its clientId property). That's
// exactly what Heartbeat is for.
// If the Label element has a body that renders some non-blank output, that takes precedence
// over the label string provided by the field.