2014-04-10 73 views
1

怎麼能夠使用佈局組件(新vaadin)滾動vaadin視圖來顯示所有的組件在頁面

眼下無論組件我在UI組件添加vaadin實現Html網頁中只有一些組件出現在瀏覽器...

沒有滾動選項來查看我在層次

public class LoginView extends CustomComponent implements View, 
    Button.ClickListener { 

    public static final String NAME = "login"; 

    private TextField user; 

    private PasswordField password; 

    private Button loginButton; 
    NativeSelect select_role; 

    private HorizontalLayout fieldsBottomPanel; 

    private VerticalLayout fieldsLeftPanel; 

    private GridLayout loginPanelGrid; 

    private VerticalLayout filedsTopPanel; 

    private VerticalLayout loginFormLayout; 

    private Label top_header_panel; 

    private VerticalLayout virtualKeyboard; 

    private VerticalLayout fieldsRightPanel; 

    private VerticalLayout footer; 

    private VerticalLayout header; 

    private Window page; 



    public LoginView() { 
     setSizeFull(); 
     addTopPanelToLoginForm(); 
     addLeftPanelToLoginForm(); 
     addBottomPanelToLoginForm(); 
     addRightPanelToLoginForm(); 
     addLoginFormToPage(); 
     addFooterToPage(); 
     addHeaderToPage(); 

     VerticalLayout viewLayout = new VerticalLayout(header,loginFormLayout,footer); 
     viewLayout.setComponentAlignment(loginFormLayout, 
       Alignment.MIDDLE_CENTER); 
     viewLayout.setStyleName(Reindeer.LAYOUT_WHITE); 

     setCompositionRoot(viewLayout); 
    } 

    public void addHeaderToPage(){ 
     header = new VerticalLayout(); 
     header.setStyleName("header-login"); 
    } 


    public void addFooterToPage(){ 
     footer = new VerticalLayout(); 
     footer.addStyleName("footer-login"); 
    } 
} 
+0

你可以分享的任何截圖或代碼塊? – PopoFibo

+0

我需要網站像默認滾動,當有更多的內容可用... – aps109

回答

4

你必須把你的內容變成一個小組,因爲佈局不提供滾動條下方添加其他組件。

[...]如果[面板]有一個固定或百分比計算的規模和它的內容變得太大,不適合在內容區域,一個滾動條會出現在特定的方向。 [...]

從Vaadin書章6.6.1

看一看這個線程here

相關問題