JSF 2.0 How to display a different h:panelGroup each time an item is selected from a selectOneMenu

前端 未结 4 2077
天涯浪人
天涯浪人 2021-01-07 06:40

I have a selectOneMenu that displays some different stuff categories:


        

        
4条回答
  •  礼貌的吻别
    2021-01-07 06:55

    You said "Without Page Refresh" in that case there are 2 ways you can achieve this:
    1. AJAX: You have to attach cartInfo id with onChange event on your selectOneMenu
    which will reRender cartInfo panelGroup
    Example:

    
                           
            
          
        
    

    Note: You have to have some attribute in panelGroup to eveluate to true on change event.

    2. JavaScript: You can have your Panel inside the div and can show/hide div again on onChange event.
    Example:

    
    

    ...

    
    

提交回复
热议问题