primefaces change center layout with menubar

前端 未结 2 746
既然无缘
既然无缘 2021-01-16 07:47

Hi I have a template with header, menu and content, and I built my dynamic menu menubar, now I want to know how I can do to make the click of each option on my menu only upd

2条回答
  •  日久生厌
    2021-01-16 08:04

    I suggest you to use JSF Templating. By applying this approach, your pages are easy to extend and reuse.

    This is my example which use p:layout, ui:composition and etc.

    layout.xhtml

    
    
    
    
        
            Layout-menu
        
        
            
                
                    
                        
                            
                                
                                
                            
                        
                    
                
    
                
                    
                
            
        
    
    

    inputText.xhtml

    
        
            
                inputText
            
        
    
    
    

    selectOneMenu.xhtml

    
        
            
                selectOneMenu
            
        
    
    
    

    You can run test at the layout.xhtml page like this http://host:port/project/layout.xhtml

    You can see more information about Templating from another site such as JSF 2 Templating With Facelets Example, Using Facelets Templates and etc.

提交回复
热议问题