Styling input component after validation failed

后端 未结 2 1404
遇见更好的自我
遇见更好的自我 2020-12-20 03:23

How can I style a component after validation failed?

I have the following textfield:



        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-20 03:45

    I tried the linked example and got the SystemEventListener.processEvent() to trigger when using

    
    

    So i figured it has do with faces-config.xml. Specifying the primefaces InputText as source-class did the trick:

    
        
            RequiredFieldValidationListener
            javax.faces.event.PostValidateEvent
            org.primefaces.component.inputtext.InputText
        
    
    

    to use

    
    

提交回复
热议问题