Announcement Announcement Module
Collapse
No announcement yet.
GWT RootLayoutPanel - Problem rendering page from second to first (first works fine) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • GWT RootLayoutPanel - Problem rendering page from second to first (first works fine)

    I created an application with Spring Roo, then converted to a GWT app. All the code generated by Spring Roo is only for CRUD. Now i want to add a Calendar for make appointments, so i need to move to another page. Iīve added this code to ScaffoldDesktopShell.java
    Code:
    public ScaffoldDesktopShell() {
                initWidget(BINDER.createAndBindUi(this));
                    startButton.addClickHandler(new ClickHandler() {
                        @Override
                        public void onClick(ClickEvent event) {
                            RootLayoutPanel.get().add(new NovoPainel());    
                        }
                    });
                }
    ...
    Then created a new UIbinder, called it NovoPainel() and added this code:
    Code:
    public NovoPainel() {
        initWidget(uiBinder.createAndBindUi(this));
    
        botao.addClickHandler(new ClickHandler() {
    
            @Override
            public void onClick(ClickEvent event) {             
                RootLayoutPanel.get().clear(); 
                RootLayoutPanel.get().add (new ScaffoldDesktopShell()); 
            }
        });
    }
    Everything goes fine moving from my root panel to NovoPainel, but when i need to go back to rootPanel the page doesnīt render correctly. EX: Doesnīt show ** ValuePicker ** to click on left panel and render on center.

    This is my RootPanel
    http://www.flickr.com/photos/martinh...in/photostream

    This is my other panel - NovoPainel
    http://www.flickr.com/photos/martinh...in/photostream

    And finally this is my RootLayoutPanel again
    http://www.flickr.com/photos/martinh...in/photostream

    Note: In NovoPainel() i added this line
    Code:
    RootLayoutPanel.get().add (new ScaffoldDesktopShell());
    iīm not sure if this is correct, but i tried with Scaffold and ScaffoldApp and throws an error when navigating from NovoPainel to RootLayoutPanel.

    ** Probably the panel i created donīt follow the MVP pattern. Can anybody please tell me if iīm wrong and if yes, whatīs the best method for navigate to another page and then go back to Rootpanel mainPanel? **


    Help please.
    Last edited by xerife; May 8th, 2011, 02:15 AM. Reason: MVP pattern
Working...
X