Newline in

前端 未结 6 859
不知归路
不知归路 2021-01-12 11:49

Is there a way to put a new line in the message of component?



        
6条回答
  •  余生分开走
    2021-01-12 11:49

    There's no "escape" attribute in p:confirm, so you may try this. (Which is work when I tried it.)

    Page:

    
    
       
        
           
        
     
    

    Backing Bean:(simply getter and setter)

       private String msg;
    
    public void setMsg(String msg) {
        this.msg = msg;
    }
    
    public String getMsg() {       
        return msg;
    }
    

    In this way, you can also take advantage of global confirmDialog.

    However, you may need to edit other commandButtons that show confirmDialog.

提交回复
热议问题