}
@Override
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
AbstractMenu menu = (AbstractMenu) component;
MenuModel model = menu.getModel();
if(model != null && menu.getElementsCount() > 0) {
model.generateUniqueIds();
}
encodeMarkup(context, menu);
encodeScript(context, menu);
}