Primefaces p:commandButton with action not called

前端 未结 1 1011
慢半拍i
慢半拍i 2021-02-07 12:02

I\'ve got some some troubles with Primefaces 3.2 and JSF 2.1.

My Code like this:


           


        
1条回答
  •  醉酒成梦
    2021-02-07 12:08

    Try this

    Bean.java

    @ManagedBean
    @ViewScoped
    public class Bean {
    
        public String testButtonAction() {
            System.out.println("testButtonAction invoked");
            return "anotherPage.xhtml";
        }
    
        public void testButtonActionListener(ActionEvent event) {
            System.out.println("testButtonActionListener invoked");
        }
    
    }
    

    page.xhtml

    
      
        
        
      
    
    

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