1 /** 2 * Copyright 2011-2019 PrimeFaces Extensions 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.primefaces.extensions.util; 17 18 import org.primefaces.component.api.SavedState; 19 20 /** 21 * Keeps state of a component implementing {@link javax.faces.component.EditableValueHolder}. This class is used in 22 * {@link org.primefaces.extensions.component.base.AbstractDynamicData}. 23 * 24 * @author Oleg Varaksin / last modified by $Author$ 25 * @version $Revision$ 26 * @since 0.5 27 */ 28 public class SavedEditableValueState extends SavedState { 29 30 private static final long serialVersionUID = 20120425L; 31 32 private Object labelValue; 33 34 private Object disabled; 35 36 public void reset() { 37 setSubmittedValue(null); 38 setValid(true); 39 setValue(null); 40 setLocalValueSet(false); 41 } 42 43 public Object getLabelValue() { 44 return labelValue; 45 } 46 47 public void setLabelValue(Object labelValue) { 48 this.labelValue = labelValue; 49 } 50 51 public Object getDisabled() { 52 return disabled; 53 } 54 55 public void setDisabled(Object disabled) { 56 this.disabled = disabled; 57 } 58 }