Want to show a data table populated with data after a button click

后端 未结 1 889
广开言路
广开言路 2021-01-24 18:21

I want to write a code in this way, that If I click on a button a data table appears populated with data. before that there should not be the data table in view.



        
1条回答
  •  无人及你
    2021-01-24 18:41

    You can initialize a simple getter/setter :

    private boolean visible = false; // getter/setter
    
    public void getUserList(ActionEvent event)
    {
        setVisible(true);
    
        // Your code
    }
    

    And modify your view like this :

    
        
        
        
    
    
    
        
            
                
            
        
    
    

    Note the update attribute on button, h:panelGroup wrapper and rendered attribute on table.

    0 讨论(0)
提交回复
热议问题