@Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
if (!component.isRendered()) return;
ResponseWriter writer = context.getResponseWriter();
HintLabel hintLabel = (HintLabel) component;
String value = Rendering.getStringValue(context, hintLabel);
String hint = hintLabel.getHint();
String defaultHintClass = "o_hintlabel_hint" + ' ' +
DefaultStyles.getBackgroundColorClass() + ' ' + DefaultStyles.getTextColorClass();
String hintClass = Styles.getCSSClass(context,
hintLabel, hintLabel.getHintStyle(), StyleGroup.rolloverStyleGroup(), hintLabel.getHintClass(), defaultHintClass
);
writer.startElement("div", hintLabel);
writeIdAttribute(context, hintLabel);
String defaultLabelClass = Environment.isExplorer() || Environment.isSafari() ||
Environment.isChrome() || Environment.isUndefinedBrowser()
? "o_hintlabel_label_ie" : "o_hintlabel_label";
writer.writeAttribute("class", Styles.getCSSClass(context,
hintLabel, hintLabel.getStyle(), defaultLabelClass, hintLabel.getStyleClass()), null);
Rendering.writeStandardEvents(writer, hintLabel);
encodeText(writer, hintLabel, value);
if (hint != null && !hint.equals(value))
encodeHint(context, hintLabel, hintClass, hint);
writer.startElement("div", hintLabel);
String clientId = component.getClientId(context);
writer.writeAttribute("id", clientId + "::innerscripts", null);
ScriptBuilder sb = new ScriptBuilder();
sb.initScript(context, hintLabel, "O$.HintLabel._init",
hintLabel.getHintTimeout(),
hintClass,
Rendering.getRolloverClass(context, hintLabel),
hint != null);
Rendering.renderInitScript(context, sb,