Code Monkey home page Code Monkey logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Could this message help you 
http://groups.google.com/group/mvp4g/browse_thread/thread/8ced7f667001afe4?

I will look at it and let you know.

Original comment by [email protected] on 27 Jan 2010 at 12:11

from mvp4g.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
The problem is by default Mvp4g add the RootView to GWT RootPanel. LayoutPanel 
(like 
DockLayoutPanel) doesn't work well with RootPanel. 

A workaround for this issue is to not use the default entry point of Mvp4g but 
uses 
your own and have the following lines of codes:
   Mvp4gModule module = (Mvp4gModule)GWT.create( Mvp4gModule.class );
   module.createAndStartModule();
   RootLayoutPanel.get().add((Widget) module.getStartView());

Original comment by [email protected] on 27 Jan 2010 at 12:46

  • Changed state: Accepted

from mvp4g.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I had actually tried the second part of that message :

Mvp4gModule module = (Mvp4gModule)GWT.create 
( Mvp4gModule.class ); 
     module.createAndStartModule(); 
     RootPanel.get().add((Widget) module.getStartView()); 

with no luck (after, of course, changing the .xml etc. to load from a module.

I just tried adding the constructor mentioned in the first. It failed to create 
the 
Element, but by just using the .add it seems to work. Of course, I'm not sure 
that 
what it's generating is perfect, but at least the data is being displayed!

public RootTemplateView(){
        RootLayoutPanel.get().add(dock);
        /*Element element=DOM.createDiv();
        element.setClassName("hidden");
        setElement(element);*/

    }

Original comment by [email protected] on 27 Jan 2010 at 12:46

from mvp4g.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
With your demo I tried your method and it worked. However, with my actual 
project I've 
found I need the RootLayoutPanel.get().add(dock) line.

I'm not sure what's different, apart from the fact that I have an 
DockLayoutPanel 
embedded in the main DockLayoutPanel (a similar configuration to the GWT E-Mail 
sample).

Original comment by [email protected] on 27 Jan 2010 at 1:47

from mvp4g.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
Your RootView extends LazyPanel, right? Could this be the problem?
A DeckPanel can only have a LayoutPanel as a parent, but in the case your view 
extends a LazyPanel, then the parent of the DeckPanel is a SimplePanel, that 
could 
explain why the DeckPanel is not displayed.

Could you try to have your view extends Composite instead of LazyPanel?

Original comment by [email protected] on 27 Jan 2010 at 3:49

from mvp4g.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I only know Mvp4g at the usage level but I don't think it is a bug with Mvp4g 
itself.  I am using Mvp4g 1.1

In addition to using RootLayoutPanel (and <!DOCTYPE>) as pointed out by 
plcoirier (Jan 2, 2010), it seems that the start view and its chain have to be 
layouts ... below is what I got ...

MainView.ui.xml ...
    <g:DockLayoutPanel unit="PX">
        <g:north size="25">
            <g:HorizontalPanel>
                <g:cell width="1200" horizontalAlignment="ALIGN_RIGHT">
                    <g:MenuBar ui:field="menu" width="140px" animationEnabled="true" autoOpen="true">
                        <g:MenuItem ui:field="settingMenuItem">
                            <g:MenuBar vertical="true" animationEnabled="true">
                                <g:MenuItem ui:field="preferenceMenuItem"/>
                            </g:MenuBar>
                        </g:MenuItem>
                        <g:MenuItem ui:field="loginMenuItem"/>
                    </g:MenuBar>
                </g:cell>
            </g:HorizontalPanel>
        </g:north>
        <g:north size="30">
            <g:DecoratedTabBar ui:field="tabBar"/>
        </g:north>
        <g:center>
            <g:LayoutPanel ui:field="body"/>
        </g:center>
    </g:DockLayoutPanel>

ContentListView.ui.xml ... content of "body" above ...
    <g:DockLayoutPanel unit="PX">
        <g:north size="30">
            <g:SimplePanel>
                <g:Label>Header</g:Label>
            </g:SimplePanel>
        </g:north>
        <g:south size="30">
            <g:SimplePanel>
                <g:Label>Footer</g:Label>
            </g:SimplePanel>
        </g:south>
        <g:center>
            <g:SimplePanel>
                <g:Label>Body</g:Label>
            </g:SimplePanel>
        </g:center>
    </g:DockLayoutPanel>

Original comment by [email protected] on 21 Jul 2010 at 4:23

from mvp4g.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 22, 2024
I'm closing this bug since Mvp4g can be used with any kind of layout.

Original comment by [email protected] on 11 Nov 2010 at 11:52

  • Changed state: Fixed

from mvp4g.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.