protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
{
IForm form = TapestryUtils.getForm(cycle, this);
IFormComponent field = getField();
if (field != null && isPrerender())
form.prerenderField(writer, field, getLocation());
if (cycle.isRewinding()) return;
String displayName = getDisplayName();
if (displayName == null)
{
if (field == null)
throw Tapestry.createRequiredParameterException(this, "field");
displayName = field.getDisplayName();
if (displayName == null)
throw new BindingException(ValidMessages.noDisplayName(this,
field), this, null, getBinding("field"), null);
}
IValidationDelegate delegate = form.getDelegate();
String id = field == null ? null : field.getClientId();
delegate.writeLabelPrefix(field, writer, cycle);
writer.begin("label");