GWT Html Layout Conventions

后端 未结 3 1608
無奈伤痛
無奈伤痛 2020-12-31 18:50

I\'ve just started working with GWT and I\'m already recognizing the extraordinary power that it possesses. I\'m coming from a frontend world so the Java is a big learning

3条回答
  •  萌比男神i
    2020-12-31 19:37

    A combination of UI Binder and HTML Panel works best for us.

    In your .ui.xml, place code similar to -

    
    
    
    
        
    
    
    
            
    
                
    
                
    
            
    
    
    
            
    
                
    
                
    
            
    
    
    
            

    In the corresponding .java class, you will have methods like setHeader(), setSecondaryNav(), setMenu(), setFooter() etc.

    In this way, your layout is defined completely in your ui.xml. Also, you are able to use widget abstractions. Meaning you can create a Header Widget and then invoke the setHeader() method in your layout to place it properly.

提交回复
热议问题