JSF action from onChange

后端 未结 1 447
甜味超标
甜味超标 2021-01-18 08:03

I\'m trying to set up a data table with JSF that has boxes for row total that will sum the row total onChange of any box in the row. the row looks like:



        
1条回答
  •  一整个雨季
    2021-01-18 08:29

    Indeed, the onchange attribute is just treated as a plain text HTML attribute which should represent a JavaScript onchange handler function. This is not different from in "plain vanilla" HTML. Any EL expressions in that attribute will just be treated as value expressions. See also the tag documentation.

    Based on your question history, you're using JSF 2.x (please explicitly mention the exact JSF impl/version in future questions as many things are done differently in JSF 2.x as compared to JSF 1.x). So, just using the new JSF 2.0 tag should do it.

    
        
    
    
    ...
    
    
    

    with

    public void changeTotal1(AjaxBehaviorEvent event) {
        total1 = ...;
    }
    

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