Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    376
    Vote Rating
    0
    zaccret is on a distinguished road

      0  

    Default [CLOSED] Blue background after Viewport.removeAll

    [CLOSED] Blue background after Viewport.removeAll


    Env : Windows XP, gxt 1.0beta3, IE6, FF2/3
    I have a centered login form (in a white background). When the user logins, I remove the form panel and build a new UI. When the user disconnects, I remove all the components and add the login panel again. But then, the background is blue...
    Code:
         public void onModuleLoad() {
            final Viewport viewport = new Viewport();
            viewport.setLayout(new CenterLayout());
    
            final FormPanel formPanel = new FormPanel();
            formPanel.setHeading("My panel");
            formPanel.setWidth(400);
    
            Button submitButton = new Button("Submit");
            submitButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
                public void componentSelected(ButtonEvent ce) {
                    viewport.removeAll();
                    viewport.setLayout(new BorderLayout());
                    ToolBar topPanel = new ToolBar();
                    TextToolItem tool1 = new TextToolItem("Go back");
                    tool1.addSelectionListener(new SelectionListener<ButtonEvent>() {
                        public void componentSelected(ButtonEvent ce) {
                            viewport.removeAll();
                            viewport.setLayout(new CenterLayout());
                            viewport.add(formPanel);
                            viewport.layout(true);
                        }
                    });
                    topPanel.add(tool1);
                    viewport.add(topPanel, new BorderLayoutData(Style.LayoutRegion.NORTH, 25));
                    ContentPanel west = new ContentPanel();
                    west.setHeading("West");
                    viewport.add(west, new BorderLayoutData(Style.LayoutRegion.WEST, 200, 150, 350));
                    ContentPanel mainPanel = new ContentPanel();
                    viewport.add(mainPanel, new BorderLayoutData(Style.LayoutRegion.CENTER));
                    viewport.layout(true);
                }
            });
            formPanel.addButton(submitButton);
            viewport.add(formPanel);
            RootPanel.get().add(viewport);
        }

  2. #2
    Ext GWT Premium Member gslender's Avatar
    Join Date
    Mar 2008
    Location
    Brisbane, Australia
    Posts
    1,572
    Vote Rating
    2
    gslender is on a distinguished road

      0  

    Default


    You are not really destroying the formpanel. Do you have this problem if you actually set formpanel = null and re-create the object? you would need to change the formpanel from final to perhaps a global, but otherwise should be doable.

  3. #3
    Ext User
    Join Date
    Apr 2008
    Posts
    376
    Vote Rating
    0
    zaccret is on a distinguished road

      0  

    Default


    I think that after the first removeAll call (on click on submit button), formPanel shouldn't be referenced by the DOM.
    Anyway, if I do
    Code:
    formPanel.destroy(); //on submit
    ...
    viewport.add(new FormPanel()); //on go back
    instead of adding the old formPanel (or even using global variable and set it to null), I have the same issue.

  4. #4
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    BorderLayout adds a style to its container. When you "go back" that style remains. You can clear the style name if desired:

    Code:
              public void componentSelected(ToolBarEvent ce) {
                viewport.removeAll();
                viewport.setStyleName("");
                viewport.setLayout(new CenterLayout());
                viewport.add(formPanel);
                viewport.layout();
              }

Thread Participants: 2