Threaded View

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext GWT Premium Member
    Join Date
    Jan 2012
    Posts
    17
    Vote Rating
    1
    paucarre is on a distinguished road

      0  

    Default Accordion Layout does not work when it has other accordion layouts inside

    Accordion Layout does not work when it has other accordion layouts inside


    Accordion Layout does not work when it has other accordion layouts inside. It is to say, if you want to create an accordion menu with embedded accordions to have a hierarchy, new widgets are no longer shown

    The recursive code to generate the accordion is:
    Code:
    public static Widget createMenuFromMenuModel(MenuModel menuModel) {
            ContentPanel panel = new ContentPanel();
            panel.setBodyBorder(false);
            panel.setPixelSize(200, 325);
    
    
            Widget widget = getMenuWidgetFromMenuModel(menuModel, null);
            panel.add(widget);
    
    
            VerticalPanel verticalPanel = new VerticalPanel();
            verticalPanel.setSpacing(10);
            verticalPanel.add(panel);
            return verticalPanel;
    
    
        }
    
    
        private static Widget getMenuWidgetFromMenuModel(MenuModel menuModel,
                AccordionLayoutContainer accordionLayoutContainer) {
            AccordionLayoutAppearance appearance = GWT
                    .<AccordionLayoutAppearance> create(AccordionLayoutAppearance.class);
            ContentPanel contentPanel = new ContentPanel(appearance);
            contentPanel.setAnimCollapse(false);
            contentPanel.setHeadingText(menuModel.getTitle());
            Widget widgetToReturn = contentPanel;
            if (menuModel.getListOfMenuModels().size() > 0) {
                accordionLayoutContainer = new AccordionLayoutContainer();
                accordionLayoutContainer.setFill(true);
                accordionLayoutContainer.add(contentPanel);
                accordionLayoutContainer.setWidget(contentPanel);
                VerticalPanel verticalPanel = new VerticalPanel();
                verticalPanel.setSpacing(10);
                contentPanel.add(verticalPanel);
                for (MenuModel currentMenuModel : menuModel.getListOfMenuModels()) {
                    Widget widget = getMenuWidgetFromMenuModel(currentMenuModel,
                            accordionLayoutContainer);
                    verticalPanel.add(widget);
                }
            } else {
                if (menuModel.getListOfOptionModel().size() > 0) {
                    VerticalPanel verticalPanel = new VerticalPanel();
                    verticalPanel.setSpacing(10);
                    contentPanel.add(verticalPanel);
                    accordionLayoutContainer.add(contentPanel);
                    for (OptionModel currentOptionModel : menuModel
                            .getListOfOptionModel()) {
                        TextButton textButton = new TextButton();
                        textButton.setTitle(currentOptionModel.getTitle());
                        verticalPanel.add(textButton);
                    }
                }
            }
            return widgetToReturn;
        }
    Attached Images

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar