Disable/enable a JSF input component depending on value of another input component

后端 未结 2 685
你的背包
你的背包 2020-12-19 11:41

I have two radio buttons:


    
    

        
2条回答
  •  余生分开走
    2020-12-19 12:29

    Just let the target input component's disabled attribute check the value of the source input and use in the source component to update the target component. It will cause the disabled attribute to be re-evaluated. No need for a value change listener nor an additional property.

    
        
        
        
    
    
    
    

    See also:

    • Understanding PrimeFaces process/update and JSF f:ajax execute/render attributes
    • When to use valueChangeListener or f:ajax listener?

提交回复
热议问题