Comments (7)
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.
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.
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.
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.
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.
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.
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)
- Feature Request -- GWT 2.5 Closure Compiler (optional flag set) HOT 1
- Multiple presenter failed to inject itself to the enclosed reverse view HOT 8
- Error when running my project which is upgraded from GWT 2.4 to GWT 2.5 HOT 4
- GWT dev-mode ignores @Singleton for views, but production mode works HOT 3
- Support on checked exceptions for events HOT 1
- First instance of Multiple Presenter not created if "handlers" attribute used HOT 5
- Could not work with google-gin 2.0 HOT 22
- Error should be thrown if historyOnStart is set to true for child module. HOT 1
- Enable setting a loader for root module HOT 2
- Use of historyConvertor overrides navigationEvent = false in @Event annotation HOT 4
- Splitter, ReverseResizeComposite, and LazyPresenter/View NullPointer HOT 5
- @History annotation propagation
- Child module is not passing through parent filter HOT 1
- Mvp4g with Deferred Binding not creating expected rebind results HOT 2
- Patch for update mvp4g for last gin 2.1.1 and gwt 2.5.1 HOT 2
- Multiple Presenter, Multiple module HOT 2
- NavigationConfirmation is triggered after History has been updated HOT 1
- mvp4g can't be build with GWT 2.7 HOT 1
- GWT exporter cast exception from GWT.create; Tried to use mvp4g with GWT-Exporter but GWT.create didn't work HOT 4
- mvp4g for native app. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mvp4g.