component.setVisible(isVisible());
    protected void drawComponent(PresentationContext context, HtmlComponent component) throws JspException, IOException {        component.setVisible(isVisible());                InputContext inputContext = (InputContext) context;        IViewState viewState = inputContext.getViewState();        HtmlComponent componentToDraw;        List<HtmlHiddenField> hiddenFields = new ArrayList<HtmlHiddenField>();        for (HiddenSlot slot : this.hiddenSlots) {            for (String value : slot.getValues()) {                HtmlHiddenField field = new HtmlHiddenField(slot.getName(), value);                field.setTargetSlot(slot.getKey());                                hiddenFields.add(field);            }            viewState.addHiddenSlot(slot);        }        if (hasParentForm()) {            addViewStateToParentForm(viewState);        }        else {            HtmlHiddenField htmlViewStateField = new HtmlHiddenField(LifeCycleConstants.VIEWSTATE_PARAM_NAME, ViewState.encodeToBase64(viewState));            hiddenFields.add(htmlViewStateField);        }                if (isNested() || getSlot() != null) {            HtmlInlineContainer container = new HtmlInlineContainer();                        for (HtmlHiddenField field : hiddenFields) {                container.addChild(field);                }                      container.addChild(component);                        componentToDraw = container;        }        else {            HtmlForm form = inputContext.getForm();                        form.setId(getId());            form.setAction(getActionPath());            form.setMethod(HtmlForm.POST);            form.setEncoding(HtmlForm.URL_ENCODED);            form.setBody(component);            for (HtmlHiddenField field : hiddenFields) {                form.addHiddenField(field);                }                        componentToDraw = form;        }                componentToDraw.draw(pageContext);    }