JSF commandButton with immediate=“true”

后端 未结 3 627
无人及你
无人及你 2021-01-05 17:03

I have a situation where there is a selectOneMenu that has a value bound to a backing bean.

I need to have a button that doesn\'t update model values (that is why it

3条回答
  •  孤街浪徒
    2021-01-05 17:51

    For me, this has worked:

    @ManagedBean(name = "bean")
    @ViewScoped
    public class Bean {
        private SelectOneMenu component;
    
        public SelectOneMenu getComponent() {
            return selectComponent;
        }
    
        public void setComponent(SelectOneMenu component) {
            this.Component = component;
        }
        public void resetComponent() {
            component.resetValue();
        }
        ...
    }
    
        
             
    
    
    
    ...
    

    Thanks.

提交回复
热议问题