IMenuIterator menuIterator = boxComponent.listMenus(); if (menuIterator.hasNext()) { htmlWriter.enableJavaScript(); }
    protected void encodeEnd(IComponentWriter writer) throws WriterException {        IHtmlWriter htmlWriter = (IHtmlWriter) writer;        htmlWriter.endElement("DIV");        super.encodeEnd(writer);    }