@Override
public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
super.encodeEnd(facesContext, component);
UIIn in = (UIIn) component;
for (String markup : in.getMarkup()) {
if (markup.equals("changeaware")) {
String id = in.getClientId(facesContext);
final String[] cmds = {"new Example.ChangeAware('" + id + "');"};
HtmlRendererUtils.writeScriptLoader(facesContext, null, cmds);
}
if (markup.equals("blink")) {
String id = in.getClientId(facesContext);
final String[] cmds = {"new Example.Blinker('" + id + "');"};
HtmlRendererUtils.writeScriptLoader(facesContext, null, cmds);
}
}
}