2015-07-20 51 views
0

我,如何在DisclosurePanel中使用DockLayoutPanel?

我有一個DisclosurePanel。我想在這個DisclosurePanel中使用一個DockLayoutPanel(ui.xml)。我找不到任何解決方案。有人知道嗎?

我試過setContent(EncoderDetails),並沒有結果。

感謝

<g:DockLayoutPanel unit="PX" styleName="{style.panel}"> 
    <g:north size="54"> 
     <g:HTMLPanel> 
      <table width="30%"> 
       <tr> 
        <td style='padding:0px 0px 0px 10px'> 
         <g:Label text="Target Details"></g:Label> 
        </td> 
        <td style='padding:0px 0px 0px 10px'> 
         <g:TextBox ui:field="targetText" /> 
        </td> 
       </tr> 
      </table> 
     </g:HTMLPanel> 
    </g:north> 

<g:center size="350"> 
     <g:HTMLPanel> 
      <g:DisclosurePanel ui:field="disclosureDetails" 
       stylePrimaryName='menu'> 
       <g:header>Details</g:header> 
       <g:VerticalPanel ui:field="vPanel"> 
       </g:VerticalPanel> 
      </g:DisclosurePanel> 
     </g:HTMLPanel> 
    </g:center> 

final DisclosurePanel operationsPanel = new DisclosurePanel("Operations"); 
operationsPanel.setStyleName("fill-layout-width"); 
operationsPanel.addOpenHandler(new OpenHandler<DisclosurePanel>() { 
    @Override 
    public void onOpen(
     OpenEvent<DisclosurePanel> event) { 
    // TODO Auto-generated method stub 
    disclosureDetails.getHeaderTextAccessor().setText("Operations " + targetText.getText()); 
    encoderDetails = new EncoderCompositeDetails("encoderDetails"); 
    operationsPanel.setContent(encoderDetails); 

    // RootPanel.get().add(operationsPanel); 
    } 
}); 

回答

0

我已經找到了解決辦法。這是在這個時間,但任何人都有更好的解決方案,我想知道。

我不使用DockLayoutPanel和北部。現在ui.xml是先從HTMLPanel

貌似DisclosurePanel不喜歡DockLayoutPanel。我沒有嘗試不同類型的面板。