JSF unable to set dynamic id for input component

后端 未结 1 1900
慢半拍i
慢半拍i 2021-01-16 14:39

my form looks like this:

\"enter

When the user clicks \"+ Add\" a new distanc

1条回答
  •  余生分开走
    2021-01-16 15:13

    I need to be able to show individual "required" messages. Any ideas?

    For that you don't need to fiddle with IDs. JSF will do it for you. Just do

     
         
            
            
        
    
    

    This will end up in generated HTML like follows:

    
        ...
    

    Rightclick the page in browser and choose View Source to see it yourself.

    Any validation error will just be shown in the same row as the input.

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