public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
if (!RenderKitUtils.assertValid(context, component)) {
return;
}
final UIBodyDesktopTopNavBar topNavBar = (UIBodyDesktopTopNavBar) component;
final ResponseWriter writer = context.getResponseWriter();
//Fix this div id for help Mocha to know where start the desktop
topNavBar.setId(TOPNAVBAR_ID);
super.encodeBegin(context, topNavBar);
writer.startElement("div", component);
writer.writeAttribute("class", TOPNAVBAR_CLASS, null);
}