Search code examples
gwtuibindergwt-platformgwtp

not able to see DockLayoutPanel content except header


I'm trying to layout my page using DockLayoutPanel and i'm using gwt-platfrom plugin to create presenter and view pairs. when i've added the following code in my view.ui.xml i'm able to see only header part and the rest is not visible, what's wrong in my approach?

    <ui:style>        
    .eastPanel {
        background-color: #F60;
    }
    .westPanel {
        background-color: #EEE;
    }
    .northPanel {
        background-color: #39F;
    }
    .southPanel {
        background-color: #99C;
    }
    .centerPanel {
        background-color: #FFC;
    }       
</ui:style>
 <g:DockLayoutPanel unit='EM'>
   <g:north size='5'>
     <g:FlowPanel styleName="{style.northPanel}">
       <g:Label>This is the NORTH panel</g:Label>
     </g:FlowPanel>
   </g:north>
   <g:west size='15'>
     <g:FlowPanel styleName="{style.westPanel}">
       <g:Label>This is the WEST panel</g:Label>
     </g:FlowPanel>
   </g:west>
   <g:center>
     <g:FlowPanel styleName="{style.centerPanel}">
       <g:Label>This is the CENTER panel</g:Label>
     </g:FlowPanel>
   </g:center>
 </g:DockLayoutPanel>

thanks,


Solution

  • I found the reason for not revealing the page there are two mistakes while writing, 1. Use only one Unit(UM/PX/Percent) to structure all the sides of the DockLayoutPanel 2. Since I'm using gwt platform, I need to use RevealRootLayoutContentEvent.fire(this,this); in my Presenter's revealInParent() instead of RevealRootContentEvent.fire(this,this);